All checks were successful
Publish staging Docker image / Push Docker image to Gitea Container Registry (push) Successful in 2m16s
17 lines
680 B
JavaScript
17 lines
680 B
JavaScript
const { SlashCommandBuilder } = require('discord.js');
|
|
const config = require('../../config.json');
|
|
|
|
module.exports = {
|
|
data: new SlashCommandBuilder()
|
|
.setName('check-perms')
|
|
.setDescription('Check if the user has the correct permissions to start the Minecraft server.'),
|
|
async execute(interaction) {
|
|
for (const role of config.allowedRoles) {
|
|
if (interaction.member.roles.cache.has(role)) {
|
|
await interaction.reply({ content: 'You have the correct permissions to start the Minecraft server.', ephemeral: true });
|
|
return;
|
|
}
|
|
}
|
|
await interaction.reply({ content: 'You have the correct permissions to start the Minecraft server.', ephemeral: true });
|
|
},
|
|
}; |