removed the bot id cuz it was stupid

Commando
loicbersier 6 years ago
parent a917dd9fae
commit 28482d08ec

@ -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"
}

@ -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…
Cancel
Save