JaBa/commands/Fun/fml.js

39 lines
933 B
JavaScript
Raw Normal View History

2022-01-04 02:18:28 +05:00
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);
2022-01-04 02:18:28 +05:00
message.channel.send({
embeds: [embed]
});
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 = Fml;