mirror of
https://github.com/JonnyBro/JaBa.git
synced 2024-11-24 22:24:58 +05:00
31 lines
No EOL
709 B
JavaScript
31 lines
No EOL
709 B
JavaScript
const Command = require("../../base/Command");
|
|
|
|
class Eightball extends Command {
|
|
constructor(client) {
|
|
super(client, {
|
|
name: "8ball",
|
|
dirname: __dirname,
|
|
enabled: true,
|
|
guildOnly: false,
|
|
aliases: ["8b"],
|
|
memberPermissions: [],
|
|
botPermissions: ["SEND_MESSAGES", "EMBED_LINKS"],
|
|
nsfw: false,
|
|
ownerOnly: false,
|
|
cooldown: 2000
|
|
});
|
|
}
|
|
|
|
async run(message, args) {
|
|
if (!args[0] || !message.content.endsWith("?")) return message.error("fun/8ball:ERR_QUESTION");
|
|
|
|
const answerN = this.client.functions.randomNum(1, 19);
|
|
const answer = message.translate(`fun/8ball:RESPONSE_${answerN + 1}`);
|
|
|
|
message.channel.send({
|
|
content: answer
|
|
});
|
|
}
|
|
}
|
|
|
|
module.exports = Eightball; |