forked from Supositware/Haha-Yes
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.
30 lines
1.1 KiB
JavaScript
30 lines
1.1 KiB
JavaScript
const { Listener } = require('discord-akairo');
|
|
const { statsChannel } = require('../config.json');
|
|
|
|
|
|
class guildCreateListener extends Listener {
|
|
constructor() {
|
|
super('guildCreate', {
|
|
emitter: 'client',
|
|
eventName: 'guildCreate'
|
|
});
|
|
}
|
|
|
|
async exec(message) {
|
|
client.on("guildCreate", async guild => {
|
|
console.log(`${guild.name}\n${guild.memberCount} users\nOwner: ${guild.owner.user.username}\nOwner ID: ${guild.owner}`);
|
|
const channel = client.channels.get(statsChannel);
|
|
const addEmbed = new Discord.RichEmbed()
|
|
.setColor("#52e80d")
|
|
.setTitle('Someone added me ! YAY :D')
|
|
.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()
|
|
|
|
channel.send({ embed: addEmbed });
|
|
})
|
|
}
|
|
}
|
|
|
|
module.exports = guildCreateListener; |