MOOver.js/commands/hug.js

26 lines
802 B
JavaScript
Raw Permalink Normal View History

const { SlashCommandBuilder } = require('discord.js');
const help = require('../helpFunctions.js');
require('dotenv').config();
2023-02-25 12:42:21 +00:00
async function hug(interaction) {
const searchKey = 'hug-anime';
const gifAmount = 16;
const gifs = `https://g.tenor.com/v1/search?q=${searchKey}&key=${process.env.TENOR}&limit=${gifAmount}`;
2023-02-25 12:42:21 +00:00
return help.getGifWithMessage(interaction, gifs, gifAmount);
}
module.exports = {
2023-02-25 12:42:21 +00:00
data: new SlashCommandBuilder()
.setName('hug')
.setDescription('Hug all your friends!')
.addMentionableOption(options =>
options.setName('who')
.setDescription('It\'s not me.. is it? :c')),
2023-02-25 12:42:21 +00:00
async execute(interaction) {
const embed = await hug(interaction);
interaction.reply({ embeds: [embed] });
},
2023-02-25 12:42:21 +00:00
};