diff --git a/src/listeners/client/ready.js b/src/listeners/client/ready.js index d8060ea..c0f7165 100644 --- a/src/listeners/client/ready.js +++ b/src/listeners/client/ready.js @@ -45,6 +45,7 @@ module.exports = class extends Listener { .catch(client.log.error); } + 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) { diff --git a/src/routes/api/admin/guilds/[guild]/problems.js b/src/routes/api/admin/guilds/[guild]/problems.js index 7522b7c..6a80953 100644 --- a/src/routes/api/admin/guilds/[guild]/problems.js +++ b/src/routes/api/admin/guilds/[guild]/problems.js @@ -26,6 +26,10 @@ module.exports.get = fastify => ({ permission: 'EmbedLinks', }); } + + if (process.env.PUBLIC_BOT === 'false' && client.application.botPublic) { + problems.push({ id: 'botPublic' }); + } } return problems;