mirror of
https://github.com/darksaid98/cadence-discord-bot.git
synced 2026-12-02 06:28:54 +00:00
20 lines
711 B
JavaScript
20 lines
711 B
JavaScript
const { embedOptions, systemOptions } = require('../../config');
|
|
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;
|
|
};
|