mirror of
https://github.com/warengroup/eximiabots-radiox.git
synced 2025-07-01 07:43:38 +00:00
Ephemeral replies
This commit is contained in:
@ -3,17 +3,26 @@ module.exports = function (client, interaction, command) {
|
||||
const radio = client.radio.get(interaction.guild.id);
|
||||
const permissions = interaction.channel.permissionsFor(interaction.user);
|
||||
if (!radio) {
|
||||
interaction.reply(client.messageEmojis["error"] + client.messages.notPlaying);
|
||||
interaction.reply({
|
||||
content: client.messageEmojis["error"] + client.messages.notPlaying,
|
||||
ephemeral: true
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (interaction.member.voice.channel !== radio.voiceChannel) {
|
||||
interaction.reply(client.messageEmojis["error"] + client.messages.wrongVoiceChannel);
|
||||
interaction.reply({
|
||||
content: client.messageEmojis["error"] + client.messages.wrongVoiceChannel,
|
||||
ephemeral: true
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if(!command.permission == 'none'){
|
||||
if (!permissions.has(command.permission)) {
|
||||
message.noPerms = client.messages.noPerms.replace("%command.permission%", command.permission);
|
||||
interaction.reply(client.messageEmojis["error"] + message.noPerms);
|
||||
interaction.reply({
|
||||
content: client.messageEmojis["error"] + message.noPerms,
|
||||
ephemeral: true
|
||||
});
|
||||
return false;
|
||||
} else return true;
|
||||
} else return true;
|
||||
|
Reference in New Issue
Block a user