2021-12-10 21:39:54 +05:00
|
|
|
const Command = require("../../base/Command.js"),
|
|
|
|
figlet = require("figlet"),
|
|
|
|
util = require("util"),
|
|
|
|
figletAsync = util.promisify(figlet);
|
|
|
|
|
|
|
|
class Ascii extends Command {
|
2021-12-26 19:29:37 +05:00
|
|
|
constructor(client) {
|
2021-12-10 21:39:54 +05:00
|
|
|
super(client, {
|
|
|
|
name: "ascii",
|
|
|
|
dirname: __dirname,
|
|
|
|
enabled: true,
|
|
|
|
guildOnly: false,
|
|
|
|
aliases: [],
|
|
|
|
memberPermissions: [],
|
2021-12-26 19:29:37 +05:00
|
|
|
botPermissions: ["SEND_MESSAGES", "EMBED_LINKS"],
|
2021-12-10 21:39:54 +05:00
|
|
|
nsfw: false,
|
|
|
|
ownerOnly: false,
|
2021-12-22 17:32:50 +05:00
|
|
|
cooldown: 2000
|
2021-12-10 21:39:54 +05:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2021-12-26 19:29:37 +05:00
|
|
|
async run(message, args) {
|
2021-12-10 21:39:54 +05:00
|
|
|
const text = args.join(" ");
|
|
|
|
if (!text || text.length > 20) return message.error("fun/ascii:TEXT_MISSING");
|
|
|
|
|
|
|
|
const rendered = await figletAsync(text);
|
2021-12-26 19:29:37 +05:00
|
|
|
|
2022-01-04 00:35:11 +05:00
|
|
|
message.channel.send({
|
|
|
|
content: "```" + rendered + "```"
|
|
|
|
});
|
2021-12-10 21:39:54 +05:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
module.exports = Ascii;
|