Advertisement
ZIADAHMED2006

كود الرد التلقائي

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