Removed permissions property from commands

This commit is contained in:
Christer Warén 2021-09-06 21:56:19 +03:00
parent 33e4a416a9
commit 1371a83e90
13 changed files with 2 additions and 22 deletions

View File

@ -3,7 +3,6 @@ import Discord from "discord.js";
module.exports = {
name: 'bug',
description: 'Report a bug',
permission: 'none',
category: 'info',
async execute(interaction, client) {
let message = {};

View File

@ -3,7 +3,6 @@ import Discord from "discord.js";
module.exports = {
name: 'help',
description: 'Get help using bot',
permission: 'none',
category: 'info',
execute(interaction, client) {
let message = {};

View File

@ -3,7 +3,6 @@ import Discord from "discord.js";
module.exports = {
name: 'invite',
description: 'Invite Bot',
permission: 'none',
category: 'info',
execute(interaction, client) {
let message = {};

View File

@ -3,7 +3,6 @@ import Discord from "discord.js";
module.exports = {
name: 'list',
description: 'List radio stations',
permission: 'none',
category: 'radio',
execute(interaction, client) {
let message = {};

View File

@ -4,7 +4,6 @@ import fetch from "node-fetch";
module.exports = {
name: 'maintenance',
description: 'Bot Maintenance',
permission: 'none',
category: 'info',
options: [
{ type: "NUMBER", name: "action", description: "Select action", required: false}

View File

@ -1,7 +1,6 @@
module.exports = {
name: 'next',
description: 'Next Station',
permission: 'none',
category: 'radio',
async execute(interaction, client, command) {
if (client.funcs.check(client, interaction, command)) {

View File

@ -3,7 +3,6 @@ import Discord from "discord.js";
module.exports = {
name: 'nowplaying',
description: 'Current Radio Station',
permission: 'none',
category: 'radio',
async execute(interaction, client, command) {
if (client.funcs.check(client, interaction, command)) {

View File

@ -11,7 +11,6 @@ module.exports = {
options: [
{ type: "STRING", name: "query", description: "Select station", required: false}
],
permission: "none",
category: "radio",
async execute(interaction, client) {
let message = {};

View File

@ -1,7 +1,6 @@
module.exports = {
name: 'prev',
description: 'Previous Station',
permission: 'none',
category: 'radio',
async execute(interaction, client, command) {
if (client.funcs.check(client, interaction, command)) {

View File

@ -4,7 +4,6 @@ import Discord from "discord.js";
module.exports = {
name: 'statistics',
description: 'Show statistics',
permission: 'none',
category: 'info',
execute(interaction, client) {
let message = {};

View File

@ -3,7 +3,6 @@ import Discord from "discord.js";
module.exports = {
name: 'status',
description: 'Bot Status',
permission: 'none',
category: 'info',
async execute(interaction, client) {
let message = {};

View File

@ -3,7 +3,6 @@ import Discord from "discord.js";
module.exports = {
name: 'stop',
description: 'Stop radio',
permission: 'none',
category: 'radio',
async execute(interaction, client, command) {
const radio = client.radio.get(interaction.guild.id);

View File

@ -24,14 +24,6 @@ module.exports = function (client, interaction, command) {
});
return false;
}
if(!command.permission == 'none'){
if (!permissions.has(command.permission)) {
message.noPerms = client.messages.noPerms.replace("%command.permission%", command.permission);
interaction.reply({
content: client.messageEmojis["error"] + message.noPerms,
ephemeral: true
});
return false;
} else return true;
} else return true;
return true;
};