thaldrin/DiscordModules/General/info.js

43 lines
1.3 KiB
JavaScript
Raw Normal View History

2019-10-09 16:19:30 +00:00
const Command = require("../../src/structures/Command");
const { MessageEmbed } = require("discord.js");
2019-10-14 11:19:41 +00:00
const { developers, contributors, source } = require("../../config");
2019-10-09 16:19:30 +00:00
const { version: DiscordVersion } = require("discord.js");
module.exports = class Info extends Command {
constructor() {
super({
name: "info",
description: "Show the Makers and Contributors of the Bot",
aliases: ["about"],
module: "General",
cooldown: 0,
guildOnly: false,
developerOnly: false
});
}
async command(ctx) {
2019-10-14 11:19:41 +00:00
let result;
2019-10-09 16:19:30 +00:00
const contribs = [];
for (const { id, nick, reason } of contributors) {
const user = await ctx.client.users.fetch(id);
contribs.push(`${user} (${nick}) - ${reason}`);
}
const Contributors = contribs.join("\n");
let CreditEmbed = new MessageEmbed()
.setTitle(`Thaldrin, a Random Image and Utility Bot`)
.setDescription(
2019-10-14 11:19:41 +00:00
`Made by ${ctx.utils.format.bold(
2019-10-09 16:19:30 +00:00
ctx.client.users.find(user => user.id === "318044130796109825").tag
)}`
)
.addField("Language", "Javascript", true)
.addField("Library", `d.js - v${DiscordVersion}`, true)
.addField("Node", `${process.version}`, true)
2019-10-14 11:19:41 +00:00
.addField("Contributors", Contributors)
.addField("Source", `[gitdab.com/r/thaldrin](${source})`);
2019-10-09 16:19:30 +00:00
ctx.send(CreditEmbed);
}
};