You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
995 B
JavaScript
31 lines
995 B
JavaScript
6 years ago
|
const { Listener } = require('discord-akairo');
|
||
6 years ago
|
const { MessageEmbed } = require('discord.js');
|
||
6 years ago
|
const { statsChannel } = require('../config.json');
|
||
6 years ago
|
|
||
|
|
||
|
class guildCreateListener extends Listener {
|
||
6 years ago
|
constructor() {
|
||
|
super('guildDelete', {
|
||
|
emitter: 'client',
|
||
6 years ago
|
event: 'guildDelete'
|
||
6 years ago
|
});
|
||
|
}
|
||
6 years ago
|
|
||
6 years ago
|
async exec(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 = this.client.channels.get(statsChannel);
|
||
6 years ago
|
|
||
6 years ago
|
const kickEmbed = new MessageEmbed()
|
||
6 years ago
|
.setColor('#FF0000')
|
||
|
.setTitle('They kicked me out :(')
|
||
|
.setURL('https://www.youtube.com/watch?v=6n3pFFPSlW4')
|
||
|
.setThumbnail(guild.iconURL)
|
||
|
.setDescription(`${guild.name}\n${guild.id}\n${guild.memberCount} users\nOwner: ${guild.owner.user.username}\n(${guild.owner.id})`)
|
||
|
.setTimestamp();
|
||
6 years ago
|
|
||
6 years ago
|
channel.send({ embed: kickEmbed });
|
||
|
console.log('***BOT KICKED***');
|
||
|
}
|
||
6 years ago
|
}
|
||
|
|
||
|
module.exports = guildCreateListener;
|