roles requirement

This commit is contained in:
Louis Mazin 2025-11-30 16:11:38 +01:00
parent 25c3eb0dcd
commit 9ea2adf2f3
2 changed files with 3 additions and 3 deletions

View File

@ -7,8 +7,8 @@ module.exports = {
.setDescription('Redémarre le serveur Palworld'),
async execute(interaction, headers) {
if (!interaction.member.roles.get('1444684935632912394')) {
await interaction.reply({ content: '❌ Il faut avoir le rôle Rygainland pour pouvoir utiliser cette commande.', ephemeral: true });
if (!interaction.member.roles.cache.has('1444684935632912394')) {
await interaction.reply({ content: '❌ Il faut avoir le rôle Rygainland pour pouvoir utiliser cette commande.', flags: 64 });
return;
}

View File

@ -6,7 +6,7 @@ module.exports = {
.setName('start-server')
.setDescription('Démarre le serveur Palworld s\'il n\'est pas déjà en cours d\'exécution'),
async execute(interaction, headers) {
console.log(interaction.member.roles.cache.has('1444684935632912394'));
if (!interaction.member.roles.cache.has('1444684935632912394')) {
await interaction.reply({ content: '❌ Il faut avoir le rôle Rygainland pour pouvoir utiliser cette commande.', flags: 64 });
return;