Files
SupportBot/commands/links.js
T

33 lines
831 B
JavaScript
Raw Normal View History

2020-06-15 23:58:37 +01:00
// SupportBot 6.0, Created by Emerald Services
// Links Command
2019-06-09 23:52:41 +01:00
2020-01-26 22:35:45 +00:00
const Discord = require("discord.js");
const fs = require("fs");
2020-06-15 23:58:37 +01:00
const yaml = require('js-yaml');
const { execute } = require("./help");
2020-01-26 22:35:45 +00:00
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
2019-06-09 23:52:41 +01:00
2020-06-15 23:58:37 +01:00
module.exports = {
name: supportbot.LinksCommand,
2020-07-14 19:42:46 +01:00
description: supportbot.LinksDesc,
2019-06-09 23:52:41 +01:00
2020-06-15 23:58:37 +01:00
execute(message, args) {
const LinksEmbed = new Discord.MessageEmbed()
.setColor(supportbot.EmbedColour)
2019-06-09 23:52:41 +01:00
2020-06-15 23:58:37 +01:00
let botLinks = supportbot.LINKS;
let links = '';
for ( let name in botLinks ) {
links += `[${name}](${botLinks[ name ]})\n`;
};
2019-06-18 13:09:00 -03:00
2020-06-15 23:58:37 +01:00
LinksEmbed.addField(supportbot.LinksTitle, links)
2019-07-24 16:52:30 -06:00
2020-06-15 23:58:37 +01:00
message.channel.send({ embed: LinksEmbed });
2019-06-09 23:52:41 +01:00
2020-06-15 23:58:37 +01:00
}
};