removed the bot id cuz it was stupid

This commit is contained in:
loicbersier 2018-09-29 11:21:28 +02:00
parent a917dd9fae
commit 28482d08ec
2 changed files with 6 additions and 4 deletions

View file

@ -2,7 +2,6 @@
"token": "Your token", "token": "Your token",
"prefix": "your prefix", "prefix": "your prefix",
"ownerID": "Your id", "ownerID": "Your id",
"botID": "ID of the bot",
"statsChannel": "ID of the channel that the bot are going to post its stats", "statsChannel": "ID of the channel that the bot are going to post its stats",
"supportServer": "Invite link for the support server of the bot" "supportServer": "Invite link for the support server of the bot"
} }

View file

@ -32,12 +32,13 @@ client.registry
console.log(`Logged in as ${client.user.tag}! (${client.user.id})`); 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}`); 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 // 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); 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}`); 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'); client.user.setActivity('"haha help" or "@me help" for help');
} }
}); });
// When bot join a guild send embeds with details about it. // When bot join a guild send embeds with details about it.
client.on("guildCreate", async guild => { client.on("guildCreate", async guild => {
console.log(`${guild.name}\n${guild.memberCount} users\nOwner: ${guild.owner.user.username}\nOwner ID: ${guild.owner}`); console.log(`${guild.name}\n${guild.memberCount} users\nOwner: ${guild.owner.user.username}\nOwner ID: ${guild.owner}`);
@ -50,11 +51,13 @@ client.registry
.setTimestamp() .setTimestamp()
channel.send({ embed: addEmbed }); channel.send({ embed: addEmbed });
}) });
// When bot get kicked from a guild send embeds with details about it. // When bot get kicked from a guild send embeds with details about it.
client.on("guildDelete", async guild => { 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***`); 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 channel = client.channels.get(statsChannel);
const kickEmbed = new Discord.RichEmbed() const kickEmbed = new Discord.RichEmbed()
.setColor("#FF0000") .setColor("#FF0000")
.setTitle('They kicked me out :(') .setTitle('They kicked me out :(')
@ -63,7 +66,7 @@ client.registry
.setTimestamp() .setTimestamp()
channel.send({ embed: kickEmbed }); channel.send({ embed: kickEmbed });
}) });
client.on("message", async (message) => { client.on("message", async (message) => {
let message_content = message.content.toLowerCase(); let message_content = message.content.toLowerCase();