mirror of
https://github.com/darksaid98/cadence-discord-bot.git
synced 2026-12-02 14:38:49 +00:00
22 lines
780 B
JavaScript
22 lines
780 B
JavaScript
const config = require('config');
|
|
const embedOptions = config.get('embedOptions');
|
|
const systemOptions = config.get('systemOptions');
|
|
const { EmbedBuilder } = require('discord.js');
|
|
|
|
exports.notValidGuildId = async (interaction) => {
|
|
if (!systemOptions.systemGuildIds.includes(interaction.guildId)) {
|
|
await interaction.editReply({
|
|
embeds: [
|
|
new EmbedBuilder()
|
|
.setDescription(
|
|
`**${embedOptions.icons.warning} Oops!**\nNo permission to execute this command.\n\nThe command \`${interaction.commandName}\` cannot be executed in this server.`
|
|
)
|
|
.setColor(embedOptions.colors.warning)
|
|
]
|
|
});
|
|
return true;
|
|
}
|
|
|
|
return false;
|
|
};
|