Readded guild commands permissions.

Added the guild commands permissions registration to the new guild commands handling.
This commit is contained in:
Gustavo
2021-08-17 13:36:02 -03:00
parent deca5e8d31
commit 01c884d97b
4 changed files with 63 additions and 50 deletions

View File

@@ -9,31 +9,14 @@ module.exports = {
data: new SlashCommandBuilder()
.setName('ping')
.setDescription('Replies with pong!'),
/*
name: 'ping',
description: 'Replies with Pong!',
options: [{
name: 'input',
type: 'STRING',
description: 'input arg',
required: true,
}],
permissions: [{
id: '870383205306494997',
type: 'ROLE',
permission: false,
},
{
id: '873349611358670878',
type: 'ROLE',
permission: false,
},
permissions: [
{
id: '870383205306494997',
type: 'ROLE',
permission: false,
},
],
*/
async execute(interaction) {
const {
value: input,
} = interaction.options.get('input');
const row = new MessageActionRow()
.addComponents(
@@ -44,7 +27,7 @@ module.exports = {
);
interaction.reply({
content: `Ping ${input}`,
content: `Ping`,
components: [row],
});

View File

@@ -10,22 +10,13 @@ module.exports = {
data: new SlashCommandBuilder()
.setName('reload')
.setDescription('Reloads a command'),
/*
name: 'reload',
description: 'Reloads a command or all commands, for development purposes.',
defaultPermissions: false,
options: [{
name: 'command',
type: 'STRING',
description: 'Name of the command to reload.',
required: true,
}],
permissions: [{
id: ownerId,
type: 'USER',
permission: true,
}],
*/
permissions: [
{
id: '870383205306494997',
type: 'ROLE',
permission: false,
},
],
async execute(interaction) {
const {
clientCommands,