diff options
Diffstat (limited to 'Commands')
| -rw-r--r-- | Commands/join.js | 2 | ||||
| -rw-r--r-- | Commands/leave.js | 2 | ||||
| -rw-r--r-- | Commands/pause.js | 2 | ||||
| -rw-r--r-- | Commands/play.js | 2 | ||||
| -rw-r--r-- | Commands/reshuffle.js | 2 |
5 files changed, 5 insertions, 5 deletions
diff --git a/Commands/join.js b/Commands/join.js index 2649784..e9bac9b 100644 --- a/Commands/join.js +++ b/Commands/join.js @@ -31,7 +31,7 @@ export default { .setDescription('Joins voice chat'), async execute(interaction, bot) { if (!interaction.member.voice.channel) return await interaction.reply({ content: 'You need to be in a voice channel to use this command.', ephemeral: true }); - if (!interaction.member.roles.cache.has(djRole) && interaction.user.id !== ownerID && !interaction.member.permission.has(PermissionFlagsBits.ManageGuild)) return interaction.reply({ content: 'You need a specific role to execute this command', ephemeral: true }); + if (!interaction.member.roles.cache.has(djRole) && interaction.user.id !== ownerID && !interaction.memberPermissions.has(PermissionFlagsBits.ManageGuild)) return interaction.reply({ content: 'You need a specific role to execute this command', ephemeral: true }); await interaction.reply({ content: 'Joining voice channel', ephemeral: true }); return await voiceInit(bot); diff --git a/Commands/leave.js b/Commands/leave.js index 5d01822..c90231c 100644 --- a/Commands/leave.js +++ b/Commands/leave.js @@ -31,7 +31,7 @@ export default { .setDescription('Leaves the voice chat'), async execute(interaction, bot) { if (!interaction.member.voice.channel) return await interaction.reply({ content: 'You need to be in a voice channel to use this command.', ephemeral: true }); - if (!interaction.member.roles.cache.has(djRole) && interaction.user.id !== ownerID && !interaction.member.permission.has(PermissionFlagsBits.ManageGuild)) return interaction.reply({ content: 'You need a specific role to execute this command', ephemeral: true }); + if (!interaction.member.roles.cache.has(djRole) && interaction.user.id !== ownerID && !interaction.memberPermissions.has(PermissionFlagsBits.ManageGuild)) return interaction.reply({ content: 'You need a specific role to execute this command', ephemeral: true }); console.log('Leaving voice channel...'); await destroyAudio(interaction); diff --git a/Commands/pause.js b/Commands/pause.js index 9e6026c..ab5a609 100644 --- a/Commands/pause.js +++ b/Commands/pause.js @@ -30,7 +30,7 @@ export default { .setDescription('Pauses music'), async execute(interaction, bot) { if (!interaction.member.voice.channel) return await interaction.reply({ content: 'You need to be in a voice channel to use this command.', ephemeral: true }); - if (!interaction.member.roles.cache.has(djRole) && interaction.user.id !== ownerID && !interaction.member.permission.has(PermissionFlagsBits.ManageGuild)) return interaction.reply({ content: 'You need a specific role to execute this command', ephemeral: true }); + if (!interaction.member.roles.cache.has(djRole) && interaction.user.id !== ownerID && !interaction.memberPermissions.has(PermissionFlagsBits.ManageGuild)) return interaction.reply({ content: 'You need a specific role to execute this command', ephemeral: true }); if (!isAudioStatePaused) { toggleAudioState(); diff --git a/Commands/play.js b/Commands/play.js index 49f0d3e..f6a7fd3 100644 --- a/Commands/play.js +++ b/Commands/play.js @@ -42,7 +42,7 @@ export default { async execute(interaction, bot) { if (!interaction.member.voice.channel) return await interaction.reply({ content: 'You need to be in a voice channel to use this command.', ephemeral: true }); - if (!interaction.member.roles.cache.has(djRole) && interaction.user.id !== ownerID && !interaction.member.permission.has(PermissionFlagsBits.ManageGuild)) return interaction.reply({ content: 'You need a specific role to execute this command', ephemeral: true }); + if (!interaction.member.roles.cache.has(djRole) && interaction.user.id !== ownerID && !interaction.memberPermissions.has(PermissionFlagsBits.ManageGuild)) return interaction.reply({ content: 'You need a specific role to execute this command', ephemeral: true }); integer = interaction.options.getInteger('int'); if (integer) { diff --git a/Commands/reshuffle.js b/Commands/reshuffle.js index 340c91b..c16314e 100644 --- a/Commands/reshuffle.js +++ b/Commands/reshuffle.js @@ -33,7 +33,7 @@ export default { .setDescription('Reshuffles the playlist'), async execute(interaction, bot) { if (!interaction.member.voice.channel) return await interaction.reply({ content: 'You need to be in a voice channel to use this command.', ephemeral: true }); - if (!interaction.member.roles.cache.has(djRole) && interaction.user.id !== ownerID && !interaction.member.permission.has(PermissionFlagsBits.ManageGuild)) return interaction.reply({ content: 'You need a specific role to execute this command', ephemeral: true }); + if (!interaction.member.roles.cache.has(djRole) && interaction.user.id !== ownerID && !interaction.memberPermissions.has(PermissionFlagsBits.ManageGuild)) return interaction.reply({ content: 'You need a specific role to execute this command', ephemeral: true }); async function shuffleDetected(bot) { await interaction.reply({ content: 'Reshuffling the playlist...', ephemeral: true }); |
