60 lines
1.6 KiB
JavaScript
60 lines
1.6 KiB
JavaScript
const Command = require("../../src/structures/Command");
|
|
const { MessageEmbed } = require("discord.js");
|
|
const { developers, contributors } = require("../../config");
|
|
const { bold } = require("../../utils/format");
|
|
const { version: DiscordVersion } = require("discord.js");
|
|
const usage = require("usage");
|
|
|
|
const options = {
|
|
keepHistory: true
|
|
};
|
|
|
|
const format = sec => {
|
|
const pad = s => {
|
|
return (s < 10 ? "0" : "") + s;
|
|
};
|
|
|
|
let hours = Math.floor(sec / (60 * 60));
|
|
let minutes = Math.floor((sec % (60 * 60)) / 60);
|
|
let seconds = Math.floor(sec % 60);
|
|
|
|
return hours + ":" + pad(minutes) + ":" + pad(seconds);
|
|
};
|
|
|
|
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) {
|
|
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(
|
|
`Made by ${bold(
|
|
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)
|
|
.addField("Contributors", Contributors);
|
|
|
|
ctx.send(CreditEmbed);
|
|
}
|
|
};
|