update 8ball

This commit is contained in:
Jonny_Bro (Nikita) 2023-07-07 21:50:36 +05:00
parent c088c9f414
commit 00b37379f5
7 changed files with 33 additions and 14 deletions

View file

@ -1,4 +1,4 @@
const { SlashCommandBuilder } = require("discord.js");
const { SlashCommandBuilder, EmbedBuilder } = require("discord.js");
const BaseCommand = require("../../base/BaseCommand");
class Eightball extends BaseCommand {
@ -48,13 +48,29 @@ class Eightball extends BaseCommand {
await interaction.deferReply();
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);
interaction.replyT("fun/8ball:ANSWER", {
question,
answer,
}, { edit: true });
interaction.editReply({ embeds: [embed] });
}
}

View file

@ -151,7 +151,7 @@ module.exports.load = async client => {
};
},
},
websiteName: `${client.user.username} Dashboard`,
websiteName: `${client.user.getUsername()} Dashboard`,
colorScheme: "blue",
supporteMail: "",
icons: {

View file

@ -7,6 +7,9 @@
С помощью команд *adduser* и *removeuser* можно добавлять и убирать людей из тикета соответственно.\
*closeticket* позволяет принудительно закрыть тикет.
* Изменено
* Внешний вид *8ball*.
### JaBa v4.3.1
* Добавлено
* Мониторинг изменения сообщений!\

View file

@ -30,7 +30,7 @@ module.exports.init = async function (client) {
if (currentMonth === month && currentDay === day) {
const embed = new EmbedBuilder()
.setAuthor({
name: client.user.username,
name: client.user.getUsername(),
iconURL: client.user.displayAvatarURL(),
})
.setColor(client.config.embed.color)

View file

@ -1,9 +1,9 @@
{
"DESCRIPTION": "I tell the truth",
"USAGE": "[question]",
"QUESTION": "Question",
"EXAMPLES": "8ball question:Is JaBa awesome?",
"ANSWER": "**Question:** {{question}}\n**Answer:** {{answer}}",
"QUESTION": "Question",
"ANSWER": "Answer",
"RESPONSE_1": "It is certain",
"RESPONSE_2": "It is decidedly so",
"RESPONSE_3": "Without a doubt",

View file

@ -1,9 +1,9 @@
{
"DESCRIPTION": "Я говорю правду",
"USAGE": "[question]",
"QUESTION": "Вопрос",
"EXAMPLES": "8ball question:JaBa крутой?",
"ANSWER": "**Вопрос:** {{question}}\n**Ответ:** {{answer}}",
"QUESTION": "Вопрос",
"ANSWER": "Ответ",
"RESPONSE_1": "Бесспорно",
"RESPONSE_2": "Предрешено",
"RESPONSE_3": "Никаких сомнений",

View file

@ -1,9 +1,9 @@
{
"DESCRIPTION": "Я говорю правду",
"USAGE": "[question]",
"QUESTION": "Питання",
"EXAMPLES": "8ball question:JaBa крутий?",
"ANSWER": "**Питання:** {{question}}\n**Відповідь:** {{answer}}",
"QUESTION": "Питання",
"ANSWER": "Відповідь",
"RESPONSE_1": "Безперечно",
"RESPONSE_2": "Вирішено",
"RESPONSE_3": "Ніяких сумнівів",