mirror of
https://github.com/JonnyBro/JaBa.git
synced 2024-11-28 16:14:59 +05:00
b6fee7f188
Disabled memes and staff Localization changes
49 lines
No EOL
1.1 KiB
JavaScript
49 lines
No EOL
1.1 KiB
JavaScript
const { SlashCommandBuilder } = require("discord.js");
|
|
const BaseCommand = require("../../base/BaseCommand"),
|
|
fetch = require("node-fetch");
|
|
|
|
class Dog extends BaseCommand {
|
|
/**
|
|
*
|
|
* @param {import("../base/JaBa")} client
|
|
*/
|
|
constructor(client) {
|
|
super({
|
|
command: new SlashCommandBuilder()
|
|
.setName("dog")
|
|
.setDescription(client.translate("fun/dog:DESCRIPTION"))
|
|
.setDescriptionLocalizations({
|
|
"uk": client.translate("fun/dog:DESCRIPTION", null, "uk-UA"),
|
|
"ru": client.translate("fun/dog:DESCRIPTION", null, "ru-RU"),
|
|
})
|
|
.setDMPermission(true),
|
|
aliases: [],
|
|
dirname: __dirname,
|
|
ownerOnly: false,
|
|
});
|
|
}
|
|
/**
|
|
*
|
|
* @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) {
|
|
await interaction.deferReply();
|
|
|
|
const res = await fetch("https://and-here-is-my-code.glitch.me/img/dog").then(response => response.json());
|
|
|
|
interaction.editReply({
|
|
content: res.Link,
|
|
});
|
|
}
|
|
}
|
|
|
|
module.exports = Dog; |