Skip to content

Commit

Permalink
feat: public bot warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
eartharoid committed Mar 10, 2023
1 parent 2632945 commit cd71843
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/listeners/client/ready.js
Expand Up @@ -34,6 +34,12 @@ module.exports = class extends Listener {
.catch(client.log.error);
}

if (process.env.PUBLIC_BOT === 'true' && !client.application.botPublic) {
client.log.warn('The `PUBLIC_BOT` environment variable is set to `true`, but the bot is not public.');
} else if (process.env.PUBLIC_BOT === 'false' && client.application.botPublic) {
client.log.warn('Your bot is public, but public features are disabled. Set the `PUBLIC_BOT` environment variable to `true`, or make your bot private.');
}

// commands are not cached automatically
await client.application.commands.fetch();

Expand Down

0 comments on commit cd71843

Please sign in to comment.