2021-12-10 21:39:54 +05:00
|
|
|
const Command = require("../../base/Command.js");
|
|
|
|
|
|
|
|
class Eightball extends Command {
|
2021-12-26 19:29:37 +05:00
|
|
|
constructor(client) {
|
2021-12-10 21:39:54 +05:00
|
|
|
super(client, {
|
|
|
|
name: "8ball",
|
|
|
|
dirname: __dirname,
|
|
|
|
enabled: true,
|
|
|
|
guildOnly: false,
|
2022-01-01 00:50:09 +05:00
|
|
|
aliases: ["8b"],
|
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,
|
2021-12-22 17:32:50 +05:00
|
|
|
cooldown: 2000
|
2021-12-10 21:39:54 +05:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2021-12-26 19:29:37 +05:00
|
|
|
async run(message, args) {
|
2021-12-10 21:39:54 +05:00
|
|
|
if (!args[0] || !message.content.endsWith("?")) return message.error("fun/8ball:ERR_QUESTION");
|
|
|
|
|
2022-01-02 01:03:30 +05:00
|
|
|
const answerN = this.client.functions.randomNum(1, 19);
|
2021-12-29 22:45:20 +05:00
|
|
|
const answer = message.translate(`fun/8ball:RESPONSE_${answerN + 1}`);
|
2021-12-10 21:39:54 +05:00
|
|
|
|
2021-12-29 22:45:20 +05:00
|
|
|
message.channel.send(answer);
|
2021-12-10 21:39:54 +05:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
module.exports = Eightball;
|