mirror of
https://github.com/darksaid98/cadence-discord-bot.git
synced 2026-12-02 14:38:49 +00:00
Log to console when added or removed from servers
This commit is contained in:
1 parent
c1411fb7e5
commit
13e27e4f0f
1 file changed
+15
-1
@@ -42,7 +42,9 @@ client.once('ready', async () => {
|
||||
});
|
||||
|
||||
// Show how many guilds the bot is added to
|
||||
console.log(`Info: ${client.user.tag} is currently added in ${client.guilds.cache.size} guilds!`);
|
||||
console.log(
|
||||
`Info: ${client.user.tag} is currently added in ${client.guilds.cache.size} guilds!`
|
||||
);
|
||||
});
|
||||
|
||||
client.once('reconnecting', () => {
|
||||
@@ -59,6 +61,18 @@ client.on('warn', (info) => {
|
||||
|
||||
client.on('error', console.error);
|
||||
|
||||
client.on('guildCreate', (guild) => {
|
||||
console.log(
|
||||
`Info: ${client.user.tag} has been added to server '${guild.name}'!`
|
||||
);
|
||||
});
|
||||
|
||||
client.on('guildDelete', (guild) => {
|
||||
console.log(
|
||||
`Info: ${client.user.tag} was removed from server '${guild.name}'!`
|
||||
);
|
||||
});
|
||||
|
||||
client.on('interactionCreate', async (interaction) => {
|
||||
if (!interaction.isCommand()) {
|
||||
return;
|
||||
|
||||
Reference in new issue
Block a user