Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const botconfig = require("./botconfig.json");
- const Discord = require("discord.js");
- const bot = new Discord.Client({disableEveryone: true})
- bot.on("ready", async () => {
- console.log(`${bot.user.username} is online.`)
- bot.user.setActivity("Tutorial Bot", {type: "STREAMING"});
- })
- bot.on("message", async message => {
- if(message.author.bot || message.channel.type === "dm")
- let prefix = botconfig.prefix;
- let messageArray = message.content.split(" ")
- let cmd = messageArray[0];
- let args = messageArray.slice[0];
- if(cmd === `${prefix}test`){
- return message.channel.send("Working")
- }
- })
- bot.login(botconfig.token);
Add Comment
Please, Sign In to add comment