Skip to content

Commit

Permalink
[New] Added welcome message when the bot joins a new guild
Browse files Browse the repository at this point in the history
  • Loading branch information
naseif committed Sep 3, 2021
1 parent 5f726fb commit f446ea2
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions events/guildCreate.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@ const { registerSlashCommands } = require("../deploy-commands");
module.exports = {
name: "guildCreate",
async execute(guild) {
if (guild.systemChannel) {
guild.systemChannel.send({
content: "**Thanks for adding me to your server!**",
files: ["https://nekos.best/api/v1/cuddle/017.gif"],
});
} else {
return;
}
await registerSlashCommands(guild.client.user.id, guild.id);
const guilds = guild.client.guilds.cache.map((guild) => guild.id);
guild.client.user.setActivity(`${guilds.length} Servers!`, {
Expand Down

0 comments on commit f446ea2

Please sign in to comment.