fix: public bot warning condition

This commit is contained in:
Isaac
2025-02-23 01:35:10 +00:00
parent e34305c7d8
commit f96320399f
2 changed files with 2 additions and 2 deletions

View File

@@ -47,7 +47,7 @@ module.exports = class extends Listener {
await client.application.fetch();
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) {
} else if (process.env.PUBLIC_BOT !== 'true' && 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.');
}

View File

@@ -27,7 +27,7 @@ module.exports.get = fastify => ({
});
}
if (process.env.PUBLIC_BOT === 'false' && client.application.botPublic) {
if (process.env.PUBLIC_BOT !== 'true' && client.application.botPublic) {
problems.push({ id: 'botPublic' });
}
}