mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-13 00:09:08 +02:00
And so, Xiao lived the rest of her days on only 11 servers.
This commit is contained in:
@@ -9,6 +9,7 @@ const client = new CommandoClient({
|
||||
unknownCommandResponse: false,
|
||||
disabledEvents: ['TYPING_START']
|
||||
});
|
||||
const whitelist = require('./assets/json/whitelist');
|
||||
|
||||
client.registry
|
||||
.registerDefaultTypes()
|
||||
@@ -48,6 +49,11 @@ client.on('ready', () => {
|
||||
];
|
||||
client.user.setActivity(activities[Math.floor(Math.random() * activities.length)]);
|
||||
}, 60000);
|
||||
for (const guild of client.guilds.values()) {
|
||||
if (whitelist.includes(guild.id)) continue;
|
||||
console.log(`[LEAVE] Leaving guild ${guild.name}.`);
|
||||
guild.leave().catch(err => console.error(`[LEAVE] Failed to leave ${guild.name}.`, err));
|
||||
}
|
||||
});
|
||||
|
||||
client.on('disconnect', event => {
|
||||
|
||||
Reference in New Issue
Block a user