mirror of
https://github.com/darksaid98/cadence-discord-bot.git
synced 2026-12-02 06:28:54 +00:00
feat: Renamed validator files and added permission validator
This commit is contained in:
1 parent
f04937eee0
commit
b68b7dac95
18 files changed
+51
-22
No files matched your search
@@ -0,0 +1,19 @@
|
||||
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;
|
||||
};
|
||||
Reference in new issue
Block a user