JaBa/commands/Fun/fml.js

39 lines
934 B
JavaScript
Raw Normal View History

2021-12-10 21:39:54 +05:00
const Command = require("../../base/Command.js"),
Discord = require("discord.js");
class Fml extends Command {
2021-12-26 19:29:37 +05:00
constructor(client) {
2021-12-10 21:39:54 +05:00
super(client, {
name: "fml",
dirname: __dirname,
enabled: true,
guildOnly: false,
aliases: [],
2021-12-10 21:39:54 +05:00
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,
cooldown: 2000
2021-12-10 21:39:54 +05:00
});
}
2021-12-26 19:29:37 +05:00
async run(message, args, data) {
if (!this.client.config.apiKeys.blagueXYZ) return message.error("misc:COMMAND_DISABLED");
2021-12-10 21:39:54 +05:00
// 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)
2022-01-04 00:35:11 +05:00
.setFooter({
text: message.translate("fun/fml:FOOTER")
})
2022-01-03 23:20:33 +05:00
.setColor(data.config.embed.color);
2021-12-10 21:39:54 +05:00
2022-01-04 00:35:11 +05:00
message.channel.send({
embeds: [embed]
});
2021-12-10 21:39:54 +05:00
}
};
module.exports = Fml;