Files
SupportBot/Commands/info.js
T

40 lines
1.1 KiB
JavaScript
Raw Normal View History

2021-10-04 20:41:05 +01:00
// SupportBot | Emerald Services
// Info Command
const fs = require("fs");
const Discord = require("discord.js");
2021-10-24 22:41:46 +01:00
const yaml = require("js-yaml");
2021-10-27 19:30:10 -05:00
const supportbot = yaml.load(
fs.readFileSync("./Configs/supportbot.yml", "utf8")
);
const cmdconfig = yaml.load(fs.readFileSync("./Configs/commands.yml", "utf8"));
2021-10-04 20:41:05 +01:00
const Command = require("../Structures/Command.js");
module.exports = new Command({
2021-10-24 22:41:46 +01:00
name: cmdconfig.InfoCommand,
description: cmdconfig.InfoCommandDesc,
options: [],
permissions: ["SEND_MESSAGES"],
2021-10-24 22:41:46 +01:00
async run(interaction) {
2022-07-22 13:19:05 +01:00
const InfoButton = new Discord.ButtonBuilder()
2021-10-24 22:41:46 +01:00
.setLabel(supportbot.InfoButtonText)
.setURL(supportbot.InfoURL)
2022-07-22 13:19:05 +01:00
.setStyle("Link");
2021-10-24 22:41:46 +01:00
2022-07-22 13:19:05 +01:00
const inforow = new Discord.ActionRowBuilder().addComponents(InfoButton);
2021-10-24 22:41:46 +01:00
2022-07-22 13:19:05 +01:00
const InfoEmbed = new Discord.EmbedBuilder()
2021-10-24 22:41:46 +01:00
.setURL(supportbot.InfoURL)
.setTitle(supportbot.InfoTitle)
2022-07-22 13:19:05 +01:00
.setDescription(supportbot.InfoDesc)
.setColor(supportbot.InfoColour)
2021-10-24 22:41:46 +01:00
interaction.reply({
embeds: [InfoEmbed],
components: [inforow],
});
},
2022-07-22 13:19:05 +01:00
});