This commit is contained in:
ItzEmerald committed 2021-10-29 19:12:11 +01:00
1 parent 2f0ddcec3f
commit 4cd3ecf81f
27 files changed
+249 -150

No files matched your search

+17 -21
View File
@@ -5,8 +5,10 @@ const fs = require("fs");
const Discord = require("discord.js");
const yaml = require("js-yaml");
const supportbot = yaml.load(fs.readFileSync("./Data/supportbot.yml", "utf8"));
const cmdconfig = yaml.load(fs.readFileSync("./Data/commands.yml", "utf8"));
const supportbot = yaml.load(
fs.readFileSync("./Configs/supportbot.yml", "utf8")
);
const cmdconfig = yaml.load(fs.readFileSync("./Configs/commands.yml", "utf8"));
const Command = require("../Structures/Command.js");
@@ -15,22 +17,20 @@ module.exports = new Command({
description: cmdconfig.EmbedCommandDesc,
slashCommandOptions: [
{
name: "title",
description: "Embed Title",
type: "STRING",
},
name: "title",
description: "Embed Title",
type: "STRING",
},
{
name: "message",
description: "Embed Message",
type: "STRING",
},
],
permission: "SEND_MESSAGES",
async run(interaction) {
let SupportStaff =
interaction.guild.roles.cache.find(
(SupportTeam) => SupportTeam.name === supportbot.Staff
@@ -57,22 +57,18 @@ module.exports = new Command({
interaction.member.roles.cache.has(SupportStaff.id) ||
interaction.member.roles.cache.has(Admins.id)
) {
const EmbedTitle = interaction.options.getString("title");
const EmbedSubject = interaction.options.getString("message");
const EmbedTitle = interaction.options.getString("title")
const EmbedSubject = interaction.options.getString("message")
const EmbedMsg = new Discord.MessageEmbed()
.setTitle(EmbedTitle)
.setDescription(EmbedSubject)
interaction.reply({
embeds: [EmbedMsg],
});
const EmbedMsg = new Discord.MessageEmbed()
.setTitle(EmbedTitle)
.setDescription(EmbedSubject);
interaction.reply({
embeds: [EmbedMsg],
});
} else {
return interaction.reply({ embeds: [NoPerms] });
return interaction.reply({ embeds: [NoPerms] });
}
},
});