Skip to content

Commit

Permalink
refactor: concise wording
Browse files Browse the repository at this point in the history
Co-authored-by: Souji <[email protected]>
  • Loading branch information
Jiralite and almostSouji authored Nov 25, 2023
1 parent 00ab038 commit 80196ea
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions guide/creating-your-bot/main-file.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@ const { token } = require('./config.json');
const client = new Client({ intents: [GatewayIntentBits.Guilds] });

// When the client is ready, run this code (only once)
// We use 'readyClient' for the event parameter to keep it separate from the already defined 'client'
// This is important for TypeScript developers as the parameter will be a client that is ready
// with some properties being non-nullable
// The distinction between `client: Client<boolean>` and `readyClient: Client<true>` is important for TypeScript Developers.
// It makes some properties non-nullable.
client.once(Events.ClientReady, readyClient => {
console.log(`Ready! Logged in as ${readyClient.user.tag}`);
});
Expand Down

0 comments on commit 80196ea

Please sign in to comment.