From cd71843bb0b9abdac20f1450939b4a7ed8915b66 Mon Sep 17 00:00:00 2001 From: Isaac Date: Fri, 10 Mar 2023 23:47:12 +0000 Subject: [PATCH] feat: public bot warnings --- src/listeners/client/ready.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/listeners/client/ready.js b/src/listeners/client/ready.js index 9e78265..81b48c2 100644 --- a/src/listeners/client/ready.js +++ b/src/listeners/client/ready.js @@ -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();