✨ live update watching guilds
This commit is contained in:
parent
dfc5b297b2
commit
5054e6d3ca
1 changed files with 2 additions and 0 deletions
|
@ -3,10 +3,12 @@ const guilds = require('../helpers/database/models/guildSchema');
|
|||
module.exports = {
|
||||
name: 'guildCreate',
|
||||
async execute(guild) {
|
||||
const { client } = guild;
|
||||
await guilds
|
||||
.findOne(
|
||||
{ guildId: guild.id },
|
||||
{ new: true, upsert: true },
|
||||
);
|
||||
await client.user.setPresence({ activities: [{ type: 'WATCHING', name: `${client.guilds.cache.size} guilds` }], status: 'online' });
|
||||
},
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue