added messages when bot join new guild
This commit is contained in:
parent
0457d9d546
commit
5c3fe5915c
1 changed files with 14 additions and 0 deletions
14
index.js
14
index.js
|
@ -29,7 +29,21 @@ client.registry
|
|||
client.user.setActivity(activity);
|
||||
const channel = client.channels.get('487766113292124160');
|
||||
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}`);
|
||||
|
||||
});
|
||||
// when bot join a guild send embeds with detail about it
|
||||
client.on("guildCreate", guild => {
|
||||
const channel = client.channels.get('487766113292124160');
|
||||
const exampleEmbed = {
|
||||
color: 0x0099ff,
|
||||
title: 'New guild!',
|
||||
description: `${guild.name}\n${guild.memberCount} users\nOwner: ${guild.owner}`,
|
||||
timestamp: new Date(),
|
||||
};
|
||||
|
||||
channel.send({ embed: exampleEmbed });
|
||||
})
|
||||
|
||||
// Auto respond to messages
|
||||
client.on("message", (message) => {
|
||||
if(responseObject[message.content]) {
|
||||
|
|
Loading…
Reference in a new issue