Advertisement
Guest User

Untitled

a guest
Dec 16th, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. if (command === "points") {
  2.  
  3. const aid = message.author.id;
  4.  
  5. sdb.get('SELECT steamid FROM users WHERE discordid = ?', aid, (err, result) => {
  6. if (err) {
  7. console.log(err);
  8. } else {
  9. if (result.steamid === 0) {
  10.  
  11. message.channel.send("Make sure to **link your steamid** to your discord account by using `!linksteamid` before using this command.");
  12.  
  13. }else{
  14.  
  15. storedb.get('SELECT Points FROM Players WHERE SteamId = ?', result.steamid, (err, result2) => {
  16. if (err) {
  17. console.log("Here:" + err);
  18. } else {
  19. if (result2.points == 0) {
  20.  
  21. message.channel.send("You don't have any points.");
  22.  
  23. }else{
  24.  
  25. message.channel.send("You have " + result2.points + " points.");
  26.  
  27. }
  28. }
  29. })
  30.  
  31. }
  32. }
  33. })
  34.  
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement