Hotfix 2.2
Hug and headpat should be working now
This commit is contained in:
parent
3968836758
commit
b74bac9ee7
3 changed files with 10 additions and 20 deletions
|
@ -11,15 +11,8 @@ module.exports = {
|
|||
options.setName('who')
|
||||
.setDescription('Is for me? c:')),
|
||||
async execute(interaction) {
|
||||
const resultTuple = await headpat(interaction);
|
||||
const embed = resultTuple[1];
|
||||
if (resultTuple[0] == null) {
|
||||
interaction.reply({ embeds: [embed] });
|
||||
}
|
||||
else {
|
||||
const msgContent = resultTuple[0];
|
||||
interaction.reply({ content: msgContent, embeds: [embed] });
|
||||
}
|
||||
const embed = await headpat(interaction);
|
||||
interaction.reply({ embeds: [embed] });
|
||||
},
|
||||
};
|
||||
|
||||
|
|
|
@ -11,15 +11,8 @@ module.exports = {
|
|||
options.setName('who')
|
||||
.setDescription('It\'s not me.. is it? :c')),
|
||||
async execute(interaction) {
|
||||
const resultTuple = await hug(interaction);
|
||||
const embed = resultTuple[1];
|
||||
if (resultTuple[0] == null) {
|
||||
interaction.reply({ embeds: [embed] });
|
||||
}
|
||||
else {
|
||||
const msgContent = resultTuple[0];
|
||||
interaction.reply({ content: msgContent, embeds: [embed] });
|
||||
}
|
||||
const embed = await hug(interaction);
|
||||
interaction.reply({ embeds: [embed] });
|
||||
},
|
||||
};
|
||||
|
||||
|
|
|
@ -46,12 +46,16 @@ async function getGifEmbed(gifQuery, gifAmount) {
|
|||
async function getGifWithMessage(interaction, gifQuery, gifAmount) {
|
||||
const gifEmbed = getGifEmbed(gifQuery, gifAmount);
|
||||
|
||||
let who;
|
||||
try {
|
||||
return (interaction.user.username + ' headpats ' + interaction.options.getMentionable('who'), gifEmbed);
|
||||
who = interaction.options.getMentionable('who');
|
||||
}
|
||||
catch {
|
||||
return (null, gifEmbed);
|
||||
return gifEmbed;
|
||||
}
|
||||
(await gifEmbed).setDescription(interaction.user.username
|
||||
+ ` ${interaction.commandName}s ` + `${who}`);
|
||||
return gifEmbed;
|
||||
}
|
||||
|
||||
async function returnPromiseString(guildMembers) {
|
||||
|
|
Loading…
Reference in a new issue