-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
33 lines (26 loc) · 916 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
const botconfig = require("./botconfig.json");
const tokenfile = require("./token.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.setGame("Cavity Simulator")
});
bot.on("message", async message => {
if(message.author.bot) return;
if(message.channel.type === "dm") return;
let prefix = botconfig.prefix;
let messageArray = message.content.split(" ");
let cmd = messageArray[0];
let args = messageArray.slice(1);
if (cmd === `${prefix}info`){
let bicon = bot.user.displayAvatarURL;
let botembed = new Discord.RichEmbed()
.setDescription("Bot Information")
.setColor("#f47742")
.setThumbnail(bicon)
.addField("Bot Name", bot.user.username);
return message.channel.send(botembed);
}
});
bot.login(tokenfile.token);