More testing for ephemeral help
This commit is contained in:
parent
2e14dbee4e
commit
41a88efcee
@ -217,7 +217,7 @@ const functions = {
|
|||||||
|
|
||||||
return { embeds: [
|
return { embeds: [
|
||||||
helpEmbed
|
helpEmbed
|
||||||
], ephemeral: true};
|
], ephemeral: true };
|
||||||
},
|
},
|
||||||
gif(commandData) {
|
gif(commandData) {
|
||||||
return { embeds: [new Discord.MessageEmbed()
|
return { embeds: [new Discord.MessageEmbed()
|
||||||
|
@ -5,26 +5,28 @@ module.exports = {
|
|||||||
data: new SlashCommandBuilder()
|
data: new SlashCommandBuilder()
|
||||||
.setName('help')
|
.setName('help')
|
||||||
.setDescription('Send the help page.')
|
.setDescription('Send the help page.')
|
||||||
.addStringOption(option =>
|
// .addStringOption(option =>
|
||||||
option.setName('location')
|
// option.setName('location')
|
||||||
.setDescription('Send help in this channel or in DMs?')
|
// .setDescription('Send help in this channel or in DMs?')
|
||||||
.setRequired(true)
|
// .setRequired(true)
|
||||||
.addChoice('Here', 'channel')
|
// .addChoice('Here', 'channel')
|
||||||
.addChoice('DMs', 'dm')),
|
// .addChoice('DMs', 'dm'))
|
||||||
|
,
|
||||||
async execute(interaction) {
|
async execute(interaction) {
|
||||||
switch (interaction.options.getString('location')) {
|
// switch (interaction.options.getString('location')) {
|
||||||
case 'channel':
|
// case 'channel':
|
||||||
await interaction.reply(fn.embeds.help(interaction));
|
// await interaction.reply(fn.embeds.help(interaction));
|
||||||
break;
|
// break;
|
||||||
case 'dm':
|
// case 'dm':
|
||||||
await interaction.user.createDM().then(channel => {
|
// await interaction.user.createDM().then(channel => {
|
||||||
channel.send(fn.embeds.help(interaction));
|
// channel.send(fn.embeds.help(interaction));
|
||||||
interaction.reply('I\'ve sent you a copy of my help page.');
|
// interaction.reply({content: 'I\'ve sent you a copy of my help page.', ephemeral: true});
|
||||||
});
|
// });
|
||||||
break;
|
// break;
|
||||||
default:
|
// default:
|
||||||
interaction.reply('There was an error, please try again.');
|
// interaction.reply('There was an error, please try again.');
|
||||||
break;
|
// break;
|
||||||
}
|
// }
|
||||||
|
await interaction.reply(fn.embeds.help(interaction));
|
||||||
},
|
},
|
||||||
};
|
};
|
Loading…
Reference in New Issue
Block a user