removed the bot id cuz it was stupid
This commit is contained in:
parent
a917dd9fae
commit
28482d08ec
2 changed files with 6 additions and 4 deletions
|
@ -2,7 +2,6 @@
|
|||
"token": "Your token",
|
||||
"prefix": "your prefix",
|
||||
"ownerID": "Your id",
|
||||
"botID": "ID of the bot",
|
||||
"statsChannel": "ID of the channel that the bot are going to post its stats",
|
||||
"supportServer": "Invite link for the support server of the bot"
|
||||
}
|
9
index.js
9
index.js
|
@ -32,12 +32,13 @@ client.registry
|
|||
console.log(`Logged in as ${client.user.tag}! (${client.user.id})`);
|
||||
console.log(`Ready to serve in ${client.channels.size} channels on ${client.guilds.size} servers, for a total of ${client.users.size} users. ${client.readyAt}`);
|
||||
// Send stats to the "stats" channel in the support server if its not the test bot
|
||||
if (client.user.id === botID) {
|
||||
if (client.user.id === 377563711927484418) {
|
||||
const channel = client.channels.get(statsChannel);
|
||||
channel.send(`Ready to serve in ${client.channels.size} channels on ${client.guilds.size} servers, for a total of ${client.users.size} users. ${client.readyAt}`);
|
||||
client.user.setActivity('"haha help" or "@me help" for help');
|
||||
}
|
||||
});
|
||||
|
||||
// When bot join a guild send embeds with details about it.
|
||||
client.on("guildCreate", async guild => {
|
||||
console.log(`${guild.name}\n${guild.memberCount} users\nOwner: ${guild.owner.user.username}\nOwner ID: ${guild.owner}`);
|
||||
|
@ -50,11 +51,13 @@ client.registry
|
|||
.setTimestamp()
|
||||
|
||||
channel.send({ embed: addEmbed });
|
||||
})
|
||||
});
|
||||
|
||||
// When bot get kicked from a guild send embeds with details about it.
|
||||
client.on("guildDelete", async guild => {
|
||||
console.log(`***BOT KICKED***\n${guild.name}\n${guild.memberCount} users\nOwner: ${guild.owner.user.username}\nOwner ID: ${guild.owner}\n***BOT KICKED***`);
|
||||
const channel = client.channels.get(statsChannel);
|
||||
|
||||
const kickEmbed = new Discord.RichEmbed()
|
||||
.setColor("#FF0000")
|
||||
.setTitle('They kicked me out :(')
|
||||
|
@ -63,7 +66,7 @@ client.registry
|
|||
.setTimestamp()
|
||||
|
||||
channel.send({ embed: kickEmbed });
|
||||
})
|
||||
});
|
||||
|
||||
client.on("message", async (message) => {
|
||||
let message_content = message.content.toLowerCase();
|
||||
|
|
Loading…
Reference in a new issue