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,
|
2021-12-26 19:29:37 +05:00
|
|
|
aliases: ["eight-ball", "eightball"],
|
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");
|
|
|
|
|
|
|
|
const answerNO = parseInt(Math.floor(Math.random() * 10), 10);
|
|
|
|
const answer = message.translate(`fun/8ball:RESPONSE_${answerNO + 1}`);
|
|
|
|
|
2021-12-21 11:11:38 +05:00
|
|
|
message.channel.send(`<@${message.author.id}>, ${answer}`);
|
2021-12-10 21:39:54 +05:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
module.exports = Eightball;
|