MOOver.js/commands/hug.js
ZyLacx b74bac9ee7 Hotfix 2.2
Hug and headpat should be working now
2022-02-12 15:05:59 +01:00

25 lines
No EOL
792 B
JavaScript

const { SlashCommandBuilder } = require('@discordjs/builders');
const help = require('../helpFunctions.js');
require('dotenv').config();
module.exports = {
data: new SlashCommandBuilder()
.setName('hug')
.setDescription('Hug all your friends!')
.addMentionableOption(options =>
options.setName('who')
.setDescription('It\'s not me.. is it? :c')),
async execute(interaction) {
const embed = await hug(interaction);
interaction.reply({ embeds: [embed] });
},
};
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}`;
return help.getGifWithMessage(interaction, gifs, gifAmount);
}