mirror of
https://github.com/JonnyBro/JaBa.git
synced 2024-11-25 06:34:58 +05:00
update 8ball
This commit is contained in:
parent
c088c9f414
commit
00b37379f5
7 changed files with 33 additions and 14 deletions
|
@ -1,4 +1,4 @@
|
||||||
const { SlashCommandBuilder } = require("discord.js");
|
const { SlashCommandBuilder, EmbedBuilder } = require("discord.js");
|
||||||
const BaseCommand = require("../../base/BaseCommand");
|
const BaseCommand = require("../../base/BaseCommand");
|
||||||
|
|
||||||
class Eightball extends BaseCommand {
|
class Eightball extends BaseCommand {
|
||||||
|
@ -48,13 +48,29 @@ class Eightball extends BaseCommand {
|
||||||
await interaction.deferReply();
|
await interaction.deferReply();
|
||||||
|
|
||||||
const question = interaction.options.getString("question");
|
const question = interaction.options.getString("question");
|
||||||
const answer = interaction.translate(`fun/8ball:RESPONSE_${client.functions.randomNum(1, 20)}`);
|
const embed = new EmbedBuilder()
|
||||||
|
.setTitle(interaction.translate("fun/8ball:DESCRIPTION"))
|
||||||
|
.setAuthor({
|
||||||
|
name: client.user.getUsername(),
|
||||||
|
iconURL: client.user.displayAvatarURL(),
|
||||||
|
})
|
||||||
|
.setFields(
|
||||||
|
{
|
||||||
|
name: interaction.translate("fun/8ball:QUESTION"),
|
||||||
|
value: question,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: interaction.translate("fun/8ball:ANSWER"),
|
||||||
|
value: interaction.translate(`fun/8ball:RESPONSE_${client.functions.randomNum(1, 20)}`),
|
||||||
|
},
|
||||||
|
)
|
||||||
|
.setColor(client.config.embed.color)
|
||||||
|
.setFooter(client.config.embed.footer)
|
||||||
|
.setTimestamp();
|
||||||
|
|
||||||
await client.wait(5000);
|
await client.wait(5000);
|
||||||
|
|
||||||
interaction.replyT("fun/8ball:ANSWER", {
|
interaction.editReply({ embeds: [embed] });
|
||||||
question,
|
|
||||||
answer,
|
|
||||||
}, { edit: true });
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -151,7 +151,7 @@ module.exports.load = async client => {
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
websiteName: `${client.user.username} Dashboard`,
|
websiteName: `${client.user.getUsername()} Dashboard`,
|
||||||
colorScheme: "blue",
|
colorScheme: "blue",
|
||||||
supporteMail: "",
|
supporteMail: "",
|
||||||
icons: {
|
icons: {
|
||||||
|
|
|
@ -7,6 +7,9 @@
|
||||||
С помощью команд *adduser* и *removeuser* можно добавлять и убирать людей из тикета соответственно.\
|
С помощью команд *adduser* и *removeuser* можно добавлять и убирать людей из тикета соответственно.\
|
||||||
*closeticket* позволяет принудительно закрыть тикет.
|
*closeticket* позволяет принудительно закрыть тикет.
|
||||||
|
|
||||||
|
* Изменено
|
||||||
|
* Внешний вид *8ball*.
|
||||||
|
|
||||||
### JaBa v4.3.1
|
### JaBa v4.3.1
|
||||||
* Добавлено
|
* Добавлено
|
||||||
* Мониторинг изменения сообщений!\
|
* Мониторинг изменения сообщений!\
|
||||||
|
|
|
@ -30,7 +30,7 @@ module.exports.init = async function (client) {
|
||||||
if (currentMonth === month && currentDay === day) {
|
if (currentMonth === month && currentDay === day) {
|
||||||
const embed = new EmbedBuilder()
|
const embed = new EmbedBuilder()
|
||||||
.setAuthor({
|
.setAuthor({
|
||||||
name: client.user.username,
|
name: client.user.getUsername(),
|
||||||
iconURL: client.user.displayAvatarURL(),
|
iconURL: client.user.displayAvatarURL(),
|
||||||
})
|
})
|
||||||
.setColor(client.config.embed.color)
|
.setColor(client.config.embed.color)
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
{
|
{
|
||||||
"DESCRIPTION": "I tell the truth",
|
"DESCRIPTION": "I tell the truth",
|
||||||
"USAGE": "[question]",
|
"USAGE": "[question]",
|
||||||
"QUESTION": "Question",
|
|
||||||
"EXAMPLES": "8ball question:Is JaBa awesome?",
|
"EXAMPLES": "8ball question:Is JaBa awesome?",
|
||||||
"ANSWER": "**Question:** {{question}}\n**Answer:** {{answer}}",
|
"QUESTION": "Question",
|
||||||
|
"ANSWER": "Answer",
|
||||||
"RESPONSE_1": "It is certain",
|
"RESPONSE_1": "It is certain",
|
||||||
"RESPONSE_2": "It is decidedly so",
|
"RESPONSE_2": "It is decidedly so",
|
||||||
"RESPONSE_3": "Without a doubt",
|
"RESPONSE_3": "Without a doubt",
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
{
|
{
|
||||||
"DESCRIPTION": "Я говорю правду",
|
"DESCRIPTION": "Я говорю правду",
|
||||||
"USAGE": "[question]",
|
"USAGE": "[question]",
|
||||||
"QUESTION": "Вопрос",
|
|
||||||
"EXAMPLES": "8ball question:JaBa крутой?",
|
"EXAMPLES": "8ball question:JaBa крутой?",
|
||||||
"ANSWER": "**Вопрос:** {{question}}\n**Ответ:** {{answer}}",
|
"QUESTION": "Вопрос",
|
||||||
|
"ANSWER": "Ответ",
|
||||||
"RESPONSE_1": "Бесспорно",
|
"RESPONSE_1": "Бесспорно",
|
||||||
"RESPONSE_2": "Предрешено",
|
"RESPONSE_2": "Предрешено",
|
||||||
"RESPONSE_3": "Никаких сомнений",
|
"RESPONSE_3": "Никаких сомнений",
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
{
|
{
|
||||||
"DESCRIPTION": "Я говорю правду",
|
"DESCRIPTION": "Я говорю правду",
|
||||||
"USAGE": "[question]",
|
"USAGE": "[question]",
|
||||||
"QUESTION": "Питання",
|
|
||||||
"EXAMPLES": "8ball question:JaBa крутий?",
|
"EXAMPLES": "8ball question:JaBa крутий?",
|
||||||
"ANSWER": "**Питання:** {{question}}\n**Відповідь:** {{answer}}",
|
"QUESTION": "Питання",
|
||||||
|
"ANSWER": "Відповідь",
|
||||||
"RESPONSE_1": "Безперечно",
|
"RESPONSE_1": "Безперечно",
|
||||||
"RESPONSE_2": "Вирішено",
|
"RESPONSE_2": "Вирішено",
|
||||||
"RESPONSE_3": "Ніяких сумнівів",
|
"RESPONSE_3": "Ніяких сумнівів",
|
||||||
|
|
Loading…
Reference in a new issue