Files
SupportBot/Commands/info.js
T

51 lines
1.2 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");
2022-08-12 01:35:36 +01:00
2021-10-27 19:30:10 -05:00
const supportbot = yaml.load(
fs.readFileSync("./Configs/supportbot.yml", "utf8")
);
2022-08-12 01:35:36 +01:00
const cmdconfig = yaml.load(
fs.readFileSync("./Configs/commands.yml", "utf8")
);
const msgconfig = yaml.load(
fs.readFileSync("./Configs/messages.yml", "utf8")
);
2021-10-04 20:41:05 +01:00
const Command = require("../Structures/Command.js");
module.exports = new Command({
2022-07-23 07:50:12 +01:00
name: cmdconfig.Info.Command,
description: cmdconfig.Info.Description,
options: [],
2022-07-23 07:50:12 +01:00
permissions: cmdconfig.Info.Permission,
2021-10-24 22:41:46 +01:00
async run(interaction) {
2022-08-12 01:35:36 +01:00
let disableCommand = true;
2022-07-23 07:50:12 +01:00
const InfoButton = new Discord.ButtonBuilder()
2022-08-12 01:35:36 +01:00
.setLabel(msgconfig.Info.Button)
.setURL(msgconfig.Info.URL)
2022-07-23 07:50:12 +01:00
.setStyle("Link");
const inforow = new Discord.ActionRowBuilder().addComponents(InfoButton);
const InfoEmbed = new Discord.EmbedBuilder()
2022-08-12 01:35:36 +01:00
.setURL(msgconfig.Info.URL)
.setTitle(msgconfig.Info.Title)
.setDescription(msgconfig.Info.Description)
.setColor(msgconfig.Info.Colour)
2022-07-23 07:50:12 +01:00
interaction.reply({
embeds: [InfoEmbed],
components: [inforow],
});
2021-10-24 22:41:46 +01:00
},
2022-07-22 13:19:05 +01:00
});