role requirement

This commit is contained in:
Louis Mazin 2025-11-30 15:49:53 +01:00
parent 112fe170a6
commit 00940db0ce
2 changed files with 12 additions and 0 deletions

View File

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

View File

@ -6,6 +6,12 @@ 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) {
if (!interaction.member.roles.cache.has('1444684935632912394')) {
await interaction.reply({ content: '❌ Il faut avoir le rôle Rygainland pour pouvoir utiliser cette commande.', ephemeral: true });
return;
}
await interaction.deferReply();
try {