Advertisement
Alexhill2233

Help plz

May 7th, 2017
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. const Discord = require("discord.js");
  2.  
  3. const TOKEN = "BotTokenHere";
  4. const PREFIX = "e!";
  5.  
  6. var bot = new Discord.Client();
  7.  
  8. bot.on("ready",function() {
  9. console.log("Ready!");
  10. })
  11.  
  12. bot.on("message", function(message) {
  13. if (message.author.equals(bot.user)) return;
  14.  
  15. if (message.content.startsWith(PREFIX)) return;
  16.  
  17. var args = message.content.substring(PREFIX.length).split(" ");
  18.  
  19. switch (args[0]) {
  20. case "ping":
  21. message.channel.sendMessage("Pong!");
  22. break;
  23. }
  24. });
  25.  
  26. bot.login(TOKEN);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement