mirror of
https://github.com/warengroup/eximiabots-radiox.git
synced 2024-12-23 00:33:17 +00:00
Removed permissions property from commands
This commit is contained in:
parent
33e4a416a9
commit
1371a83e90
@ -3,7 +3,6 @@ import Discord from "discord.js";
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
name: 'bug',
|
name: 'bug',
|
||||||
description: 'Report a bug',
|
description: 'Report a bug',
|
||||||
permission: 'none',
|
|
||||||
category: 'info',
|
category: 'info',
|
||||||
async execute(interaction, client) {
|
async execute(interaction, client) {
|
||||||
let message = {};
|
let message = {};
|
||||||
|
@ -3,7 +3,6 @@ import Discord from "discord.js";
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
name: 'help',
|
name: 'help',
|
||||||
description: 'Get help using bot',
|
description: 'Get help using bot',
|
||||||
permission: 'none',
|
|
||||||
category: 'info',
|
category: 'info',
|
||||||
execute(interaction, client) {
|
execute(interaction, client) {
|
||||||
let message = {};
|
let message = {};
|
||||||
|
@ -3,7 +3,6 @@ import Discord from "discord.js";
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
name: 'invite',
|
name: 'invite',
|
||||||
description: 'Invite Bot',
|
description: 'Invite Bot',
|
||||||
permission: 'none',
|
|
||||||
category: 'info',
|
category: 'info',
|
||||||
execute(interaction, client) {
|
execute(interaction, client) {
|
||||||
let message = {};
|
let message = {};
|
||||||
|
@ -3,7 +3,6 @@ import Discord from "discord.js";
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
name: 'list',
|
name: 'list',
|
||||||
description: 'List radio stations',
|
description: 'List radio stations',
|
||||||
permission: 'none',
|
|
||||||
category: 'radio',
|
category: 'radio',
|
||||||
execute(interaction, client) {
|
execute(interaction, client) {
|
||||||
let message = {};
|
let message = {};
|
||||||
|
@ -4,7 +4,6 @@ import fetch from "node-fetch";
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
name: 'maintenance',
|
name: 'maintenance',
|
||||||
description: 'Bot Maintenance',
|
description: 'Bot Maintenance',
|
||||||
permission: 'none',
|
|
||||||
category: 'info',
|
category: 'info',
|
||||||
options: [
|
options: [
|
||||||
{ type: "NUMBER", name: "action", description: "Select action", required: false}
|
{ type: "NUMBER", name: "action", description: "Select action", required: false}
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
name: 'next',
|
name: 'next',
|
||||||
description: 'Next Station',
|
description: 'Next Station',
|
||||||
permission: 'none',
|
|
||||||
category: 'radio',
|
category: 'radio',
|
||||||
async execute(interaction, client, command) {
|
async execute(interaction, client, command) {
|
||||||
if (client.funcs.check(client, interaction, command)) {
|
if (client.funcs.check(client, interaction, command)) {
|
||||||
|
@ -3,7 +3,6 @@ import Discord from "discord.js";
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
name: 'nowplaying',
|
name: 'nowplaying',
|
||||||
description: 'Current Radio Station',
|
description: 'Current Radio Station',
|
||||||
permission: 'none',
|
|
||||||
category: 'radio',
|
category: 'radio',
|
||||||
async execute(interaction, client, command) {
|
async execute(interaction, client, command) {
|
||||||
if (client.funcs.check(client, interaction, command)) {
|
if (client.funcs.check(client, interaction, command)) {
|
||||||
|
@ -11,7 +11,6 @@ module.exports = {
|
|||||||
options: [
|
options: [
|
||||||
{ type: "STRING", name: "query", description: "Select station", required: false}
|
{ type: "STRING", name: "query", description: "Select station", required: false}
|
||||||
],
|
],
|
||||||
permission: "none",
|
|
||||||
category: "radio",
|
category: "radio",
|
||||||
async execute(interaction, client) {
|
async execute(interaction, client) {
|
||||||
let message = {};
|
let message = {};
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
name: 'prev',
|
name: 'prev',
|
||||||
description: 'Previous Station',
|
description: 'Previous Station',
|
||||||
permission: 'none',
|
|
||||||
category: 'radio',
|
category: 'radio',
|
||||||
async execute(interaction, client, command) {
|
async execute(interaction, client, command) {
|
||||||
if (client.funcs.check(client, interaction, command)) {
|
if (client.funcs.check(client, interaction, command)) {
|
||||||
|
@ -4,7 +4,6 @@ import Discord from "discord.js";
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
name: 'statistics',
|
name: 'statistics',
|
||||||
description: 'Show statistics',
|
description: 'Show statistics',
|
||||||
permission: 'none',
|
|
||||||
category: 'info',
|
category: 'info',
|
||||||
execute(interaction, client) {
|
execute(interaction, client) {
|
||||||
let message = {};
|
let message = {};
|
||||||
|
@ -3,7 +3,6 @@ import Discord from "discord.js";
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
name: 'status',
|
name: 'status',
|
||||||
description: 'Bot Status',
|
description: 'Bot Status',
|
||||||
permission: 'none',
|
|
||||||
category: 'info',
|
category: 'info',
|
||||||
async execute(interaction, client) {
|
async execute(interaction, client) {
|
||||||
let message = {};
|
let message = {};
|
||||||
|
@ -3,7 +3,6 @@ import Discord from "discord.js";
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
name: 'stop',
|
name: 'stop',
|
||||||
description: 'Stop radio',
|
description: 'Stop radio',
|
||||||
permission: 'none',
|
|
||||||
category: 'radio',
|
category: 'radio',
|
||||||
async execute(interaction, client, command) {
|
async execute(interaction, client, command) {
|
||||||
const radio = client.radio.get(interaction.guild.id);
|
const radio = client.radio.get(interaction.guild.id);
|
||||||
|
@ -24,14 +24,6 @@ module.exports = function (client, interaction, command) {
|
|||||||
});
|
});
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if(!command.permission == 'none'){
|
|
||||||
if (!permissions.has(command.permission)) {
|
return true;
|
||||||
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;
|
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user