Advertisement
Guest User

Untitled

a guest
Mar 23rd, 2019
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. const botconfig = require("./botconfig.json");
  2. const Discord = require("discord.js");
  3.  
  4.  
  5. const bot = new Discord.Client ({disableEveryone: true});
  6.  
  7.  
  8. bot.on("ready", async () => {
  9. console.log(`$bot.user.username) is online`)
  10. bot.user.setActivity("Hello", {type: "STREAMING"});
  11. })
  12.  
  13. bot.on("message", async message => {
  14. if(message.author.bot || message.channel.type ==="dm") return;
  15.  
  16. let prefix = botconfig.prefix;
  17. let messageArray = message.content.split(" ")
  18. let cmd = messageArray[0];
  19. let args = messageArray.slice(1);
  20.  
  21. if (cmd === `${prefix}hello`){
  22. return message.channel.send("hello");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement