mirror of
https://github.com/Hessenuk/DiscordTickets.git
synced 2025-02-23 18:51:29 +02:00
feat(api): public bot warning
This commit is contained in:
parent
55660e8c4e
commit
96cc84e13c
@ -45,6 +45,7 @@ module.exports = class extends Listener {
|
|||||||
.catch(client.log.error);
|
.catch(client.log.error);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
await client.application.fetch();
|
||||||
if (process.env.PUBLIC_BOT === 'true' && !client.application.botPublic) {
|
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.');
|
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 === 'false' && client.application.botPublic) {
|
||||||
|
@ -26,6 +26,10 @@ module.exports.get = fastify => ({
|
|||||||
permission: 'EmbedLinks',
|
permission: 'EmbedLinks',
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (process.env.PUBLIC_BOT === 'false' && client.application.botPublic) {
|
||||||
|
problems.push({ id: 'botPublic' });
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return problems;
|
return problems;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user