mirror of
https://github.com/warengroup/eximiabots-radiox.git
synced 2024-11-10 03:40:19 +00:00
Changed interaction replies to ephemeral in commands
This commit is contained in:
parent
c673ae27f6
commit
f9d195788c
@ -9,7 +9,10 @@ module.exports = {
|
||||
let message = {};
|
||||
if(!client.stations) {
|
||||
message.errorToGetPlaylist = client.messages.errorToGetPlaylist.replace("%client.config.supportGuild%", client.config.supportGuild);
|
||||
return interaction.reply(client.messageEmojis["error"] + message.errorToGetPlaylist);
|
||||
return interaction.reply({
|
||||
content: client.messageEmojis["error"] + message.errorToGetPlaylist,
|
||||
ephemeral: true
|
||||
});
|
||||
}
|
||||
|
||||
const radio = client.radio.get(interaction.guild.id);
|
||||
|
@ -11,7 +11,10 @@ module.exports = {
|
||||
async execute(interaction, client) {
|
||||
let message = {};
|
||||
|
||||
if(!client.funcs.isDev(client.config.devId, interaction.user.id)) return interaction.reply(client.messageEmojis["error"] + client.messages.notAllowed);
|
||||
if(!client.funcs.isDev(client.config.devId, interaction.user.id)) return interaction.reply({
|
||||
content: client.messageEmojis["error"] + client.messages.notAllowed,
|
||||
ephemeral: true
|
||||
});
|
||||
let action = interaction.options?.getNumber("action") ?? interaction.values?.[0];
|
||||
const options = new Array(
|
||||
{
|
||||
|
@ -43,10 +43,16 @@ module.exports = {
|
||||
if (!query) return interaction.reply(client.messages.noQuery);
|
||||
const permissions = voiceChannel.permissionsFor(interaction.client.user);
|
||||
if (!permissions.has("CONNECT")) {
|
||||
return interaction.reply(client.messageEmojis["error"] + client.messages.noPermsConnect);
|
||||
return interaction.reply({
|
||||
content: client.messageEmojis["error"] + client.messages.noPermsConnect,
|
||||
ephemeral: true
|
||||
});
|
||||
}
|
||||
if (!permissions.has("SPEAK")) {
|
||||
return interaction.reply(client.messageEmojis["error"] + client.messages.noPermsSpeak);
|
||||
return interaction.reply({
|
||||
content: client.messageEmojis["error"] + client.messages.noPermsSpeak,
|
||||
ephemeral: true
|
||||
});
|
||||
}
|
||||
let station;
|
||||
const number = parseInt(query - 1);
|
||||
@ -129,7 +135,10 @@ module.exports = {
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
client.radio.delete(interaction.guild.id);
|
||||
return interaction.reply(client.messageEmojis["error"] + `An error occured: ${error}`);
|
||||
return interaction.reply({
|
||||
content: client.messageEmojis["error"] + `An error occured: ${error}`,
|
||||
ephemeral: true
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
@ -15,7 +15,10 @@ module.exports = {
|
||||
|
||||
if(!client.stations) {
|
||||
message.errorToGetPlaylist = client.messages.errorToGetPlaylist.replace("%client.config.supportGuild%", client.config.supportGuild);
|
||||
return interaction.reply(client.messageEmojis["error"] + message.errorToGetPlaylist);
|
||||
return interaction.reply({
|
||||
content: client.messageEmojis["error"] + message.errorToGetPlaylist,
|
||||
ephemeral: true
|
||||
});
|
||||
}
|
||||
|
||||
if(!currentGuild || currentGuild && !currentGuild.statistics){
|
||||
|
Loading…
Reference in New Issue
Block a user