Skip to content

Commit 9844965

Browse files
authored
Merge branch 'discordjs:main' into feat/typescript
2 parents bb8fb06 + 88764cf commit 9844965

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

guide/miscellaneous/useful-packages.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -186,10 +186,10 @@ const { Client, Events, GatewayIntentBits } = require('discord.js');
186186
const client = new Client({ intents: [GatewayIntentBits.Guilds] });
187187
const logger = require('./logger');
188188

189-
client.on(Events.ClientReady, () => logger.info('The bot is online'));
190-
client.on(Events.Debug, m => logger.debug(m));
191-
client.on(Events.Warn, m => logger.warn(m));
192-
client.on(Events.Error, m => logger.error(m));
189+
client.once(Events.ClientReady, () => logger.info('The bot is online'));
190+
client.on(Events.Debug, info => logger.debug(info));
191+
client.on(Events.Warn, info => logger.warn(info));
192+
client.on(Events.Error, error => logger.error(error));
193193

194194
client.login('your-token-goes-here');
195195
```

0 commit comments

Comments
 (0)