2022-02-12 13:04:18 +00:00
|
|
|
const { SlashCommandBuilder } = require('@discordjs/builders');
|
|
|
|
const help = require('../helpFunctions.js');
|
|
|
|
|
|
|
|
require('dotenv').config();
|
|
|
|
|
2023-02-25 12:42:21 +00:00
|
|
|
async function headpat(interaction) {
|
|
|
|
const searchKey = 'headpat-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);
|
|
|
|
}
|
|
|
|
|
2022-02-12 13:04:18 +00:00
|
|
|
module.exports = {
|
2023-02-25 12:42:21 +00:00
|
|
|
data: new SlashCommandBuilder()
|
|
|
|
.setName('headpat')
|
|
|
|
.setDescription('Headpat someone!')
|
2022-02-12 13:04:18 +00:00
|
|
|
.addMentionableOption(options =>
|
|
|
|
options.setName('who')
|
|
|
|
.setDescription('Is for me? c:')),
|
2023-02-25 12:42:21 +00:00
|
|
|
async execute(interaction) {
|
2022-02-12 14:05:59 +00:00
|
|
|
const embed = await headpat(interaction);
|
|
|
|
interaction.reply({ embeds: [embed] });
|
2022-02-12 13:04:18 +00:00
|
|
|
},
|
2023-02-25 12:42:21 +00:00
|
|
|
};
|