fix: replace deprecated discord.js 'ready' event with 'clientReady' (#178)
The 'ready' event is deprecated in discord.js v14 and will break in v15. Also switch from on() to once() since this event fires only once per login. Reported-by: Aeo Written by Cameron ◯ Letta Code "The quietest fix is the one that prevents the loudest crash." -- a wise linter
This commit is contained in:
@@ -132,7 +132,7 @@ Ask the bot owner to approve with:
|
||||
partials: [Partials.Channel, Partials.Message, Partials.Reaction, Partials.User],
|
||||
});
|
||||
|
||||
this.client.on('ready', () => {
|
||||
this.client.once('clientReady', () => {
|
||||
const tag = this.client?.user?.tag || '(unknown)';
|
||||
console.log(`[Discord] Bot logged in as ${tag}`);
|
||||
console.log(`[Discord] DM policy: ${this.config.dmPolicy}`);
|
||||
|
||||
Reference in New Issue
Block a user