mirror of
https://github.com/JonnyBro/JaBa.git
synced 2024-11-29 08:34:57 +05:00
34193eea44
Мелкие правки
47 lines
No EOL
1.1 KiB
JavaScript
47 lines
No EOL
1.1 KiB
JavaScript
const { SlashCommandBuilder } = require("discord.js");
|
|
const BaseCommand = require("../../base/BaseCommand");
|
|
|
|
class LMGTFY extends BaseCommand {
|
|
/**
|
|
*
|
|
* @param {import("../base/JaBa")} client
|
|
*/
|
|
constructor(client) {
|
|
super({
|
|
command: new SlashCommandBuilder()
|
|
.setName("lmgtfy")
|
|
.setDescription(client.translate("fun/lmgtfy:DESCRIPTION"))
|
|
.addStringOption(option =>
|
|
option.setName("question")
|
|
.setDescription(client.translate("fun/8ball:QUESTION"))
|
|
.setRequired(true)),
|
|
aliases: [],
|
|
dirname: __dirname,
|
|
guildOnly: true,
|
|
ownerOnly: false
|
|
});
|
|
}
|
|
/**
|
|
*
|
|
* @param {import("../../base/JaBa")} client
|
|
*/
|
|
async onLoad() {
|
|
//...
|
|
}
|
|
/**
|
|
*
|
|
* @param {import("../../base/JaBa")} client
|
|
* @param {import("discord.js").ChatInputCommandInteraction} interaction
|
|
* @param {Array} data
|
|
*/
|
|
async execute(client, interaction) {
|
|
const question = interaction.options.getString("question").replace(/[' '_]/g, "+");
|
|
|
|
interaction.reply({
|
|
content: `<https://letmegooglethat.com/?q=${question}>`,
|
|
ephemeral: true
|
|
});
|
|
}
|
|
}
|
|
|
|
module.exports = LMGTFY; |