mirror of
https://github.com/ReVanced/revanced-bots.git
synced 2026-01-28 21:51:02 +00:00
19 lines
489 B
JavaScript
19 lines
489 B
JavaScript
import { Events } from 'discord.js';
|
|
import setMuteTimeout from '../utils/setMuteTimeout.js';
|
|
|
|
export default {
|
|
name: Events.ClientReady,
|
|
once: false,
|
|
async execute(_, config, client) {
|
|
console.log('Client is ready. Reloading mutes.');
|
|
|
|
const mutes = await client.db.collection('muted').find().toArray();
|
|
|
|
for (const mute of mutes) {
|
|
await setMuteTimeout(mute, client, config);
|
|
}
|
|
|
|
console.log(`Loaded ${mutes.length} mutes.`);
|
|
}
|
|
};
|