Removes Restriction to execute commands

This commit is contained in:
Indrajith K L
2021-06-22 22:00:29 +05:30
parent 07d768cc40
commit bd1d07a387
2 changed files with 2 additions and 2 deletions

View File

@@ -3,7 +3,7 @@ const axios = require('axios').default;
const instance = axios.create({ const instance = axios.create({
baseURL: 'http://retrowave.ru/api/v1' baseURL: 'http://retrowave.ru/api/v1'
}); });
require('dotenv').config();
const resourceUrl = 'http://retrowave.ru' const resourceUrl = 'http://retrowave.ru'
async function broadcastRadio(client, args, message, voiceChannel, textChannel) { async function broadcastRadio(client, args, message, voiceChannel, textChannel) {
@@ -39,6 +39,7 @@ async function getNextMusic() {
module.exports = { module.exports = {
async execute(client, message, args) { async execute(client, message, args) {
if(message.author.id !== process.env.ADMIN_ID) return;
const { RADIO_CHANNEL, NOW_PLAYING_CHANNEL } = process.env; const { RADIO_CHANNEL, NOW_PLAYING_CHANNEL } = process.env;
if (!RADIO_CHANNEL) return message.reply(`Please add RADIO_CHANNEL to .env with a Voice Channel ID`); if (!RADIO_CHANNEL) return message.reply(`Please add RADIO_CHANNEL to .env with a Voice Channel ID`);
if (!NOW_PLAYING_CHANNEL) return message.reply(`Please add NOW_PLAYING_CHANNEL to .env with a Text Channel ID`); if (!NOW_PLAYING_CHANNEL) return message.reply(`Please add NOW_PLAYING_CHANNEL to .env with a Text Channel ID`);

View File

@@ -9,7 +9,6 @@ const CMD_PREFIX = "!";
client.on('message', (message) => { client.on('message', (message) => {
if (message.author.bot) return; if (message.author.bot) return;
if(message.author.id !== process.env.ADMIN_ID) return;
if (message.content.startsWith(CMD_PREFIX)) { if (message.content.startsWith(CMD_PREFIX)) {
const commandReply = parseCMD(message); const commandReply = parseCMD(message);
} }