JaBa/commands/Fun/fml.js
2022-01-13 00:26:23 +05:00

39 lines
No EOL
933 B
JavaScript

const Command = require("../../base/Command.js"),
Discord = require("discord.js");
class Fml extends Command {
constructor(client) {
super(client, {
name: "fml",
dirname: __dirname,
enabled: true,
guildOnly: false,
aliases: [],
memberPermissions: [],
botPermissions: ["SEND_MESSAGES", "EMBED_LINKS"],
nsfw: false,
ownerOnly: false,
cooldown: 2000
});
}
async run(message, args, data) {
if (!this.client.config.apiKeys.blagueXYZ) return message.error("misc:COMMAND_DISABLED");
// const fml = await this.client.joker.randomVDM(null, data.guild.language.substr(0, 2));
const fml = await this.client.joker.randomVDM(null, "en");
const embed = new Discord.MessageEmbed()
.setDescription(fml.content)
.setFooter({
text: message.translate("fun/fml:FOOTER")
})
.setColor(data.config.embed.color);
message.channel.send({
embeds: [embed]
});
}
}
module.exports = Fml;