v8.0-Dev-1.1

This commit is contained in:
ItzEmerald committed 2022-07-23 07:50:12 +01:00
1 parent 209ec0b435
commit 4e081358ff
17 files changed
+256 -99

No files matched your search

+13 -3
View File
@@ -13,8 +13,8 @@ const cmdconfig = yaml.load(fs.readFileSync("./Configs/commands.yml", "utf8"));
const Command = require("../Structures/Command.js");
module.exports = new Command({
name: cmdconfig.EmbedCommand,
description: cmdconfig.EmbedCommandDesc,
name: cmdconfig.Embed.Command,
description: cmdconfig.Embed.Description,
type: Discord.ApplicationCommandType.ChatInput,
options: [
{
@@ -67,9 +67,19 @@ module.exports = new Command({
required: false,
},
],
permissions: ["SEND_MESSAGES"],
permissions: cmdconfig.Embed.Permission,
async run(interaction) {
let disableCommand = true;
if (cmdconfig.Embed.Enabled === false) {
if (interaction.type === Discord.InteractionType.ApplicationCommand && disableCommand)
return interaction.reply({
content: ":x: This command is `disabled`",
ephemeral: true,
});
}
const { getRole } = interaction.client;
let SupportStaff = await getRole(supportbot.Staff, interaction.guild);
let Admin = await getRole(supportbot.Admin, interaction.guild);