2022-08-11 20:27:43 +05:00
|
|
|
const { SlashCommandBuilder } = require("discord.js");
|
|
|
|
const BaseCommand = require("../../base/BaseCommand"),
|
|
|
|
fetch = require("node-fetch");
|
|
|
|
|
|
|
|
class Crab extends BaseCommand {
|
|
|
|
/**
|
|
|
|
*
|
|
|
|
* @param {import("../base/JaBa")} client
|
|
|
|
*/
|
|
|
|
constructor(client) {
|
|
|
|
super({
|
|
|
|
command: new SlashCommandBuilder()
|
|
|
|
.setName("crab")
|
2022-10-13 00:05:36 +05:00
|
|
|
.setDescription(client.translate("fun/crab:DESCRIPTION"))
|
2023-06-15 19:46:27 +05:00
|
|
|
.setDescriptionLocalizations({
|
2023-07-05 00:58:06 +05:00
|
|
|
uk: client.translate("fun/crab:DESCRIPTION", null, "uk-UA"),
|
|
|
|
ru: client.translate("fun/crab:DESCRIPTION", null, "ru-RU"),
|
2023-06-15 19:46:27 +05:00
|
|
|
})
|
2022-10-13 00:05:36 +05:00
|
|
|
.setDMPermission(true),
|
2022-08-11 20:27:43 +05:00
|
|
|
aliases: [],
|
|
|
|
dirname: __dirname,
|
2022-12-15 21:02:38 +05:00
|
|
|
ownerOnly: false,
|
2022-08-11 20:27:43 +05:00
|
|
|
});
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
*
|
|
|
|
* @param {import("../../base/JaBa")} client
|
|
|
|
*/
|
|
|
|
async onLoad() {
|
|
|
|
//...
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
*
|
|
|
|
* @param {import("../../base/JaBa")} client
|
|
|
|
* @param {import("discord.js").ChatInputCommandInteraction} interaction
|
|
|
|
* @param {Object} data
|
|
|
|
*/
|
|
|
|
async execute(client, interaction) {
|
2022-08-11 21:56:29 +05:00
|
|
|
await interaction.deferReply();
|
2022-11-18 16:04:04 +05:00
|
|
|
|
2022-08-11 20:27:43 +05:00
|
|
|
const res = await fetch("https://and-here-is-my-code.glitch.me/img/crab").then(response => response.json());
|
|
|
|
|
2022-08-11 21:56:29 +05:00
|
|
|
interaction.editReply({
|
2022-12-15 21:02:38 +05:00
|
|
|
content: res.Link,
|
2022-08-11 20:27:43 +05:00
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-07-05 00:58:06 +05:00
|
|
|
module.exports = Crab;
|