JaBa/commands/Fun/ascii.js

34 lines
728 B
JavaScript
Raw Normal View History

const Command = require("../../base/Command"),
2022-01-04 02:18:28 +05:00
figlet = require("figlet"),
util = require("util"),
figletAsync = util.promisify(figlet);
class Ascii extends Command {
constructor(client) {
super(client, {
name: "ascii",
dirname: __dirname,
enabled: true,
guildOnly: false,
aliases: [],
memberPermissions: [],
botPermissions: ["SEND_MESSAGES", "EMBED_LINKS"],
nsfw: false,
ownerOnly: false,
cooldown: 2000
});
}
async run(message, args) {
const text = args.join(" ");
if (!text || text.length > 20) return message.error("fun/ascii:TEXT_MISSING");
const rendered = await figletAsync(text);
2022-02-25 00:56:32 +05:00
message.reply({
content: "```" + rendered + "```"
});
2022-01-04 02:18:28 +05:00
}
2022-01-13 00:26:23 +05:00
}
2022-01-04 02:18:28 +05:00
module.exports = Ascii;