aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIndrajith K L2021-06-22 22:00:29 +0530
committerIndrajith K L2021-06-22 22:00:29 +0530
commitbd1d07a387f28cc268266353db964ca8baf96e6d (patch)
tree0dc80d06277f324e78bc3a937d18b6d8cea6f731 /src
parent07d768cc40b3c6a8ea68e0ce1eae17f025f5ba0f (diff)
downloadradio-bot-bd1d07a387f28cc268266353db964ca8baf96e6d.tar.gz
radio-bot-bd1d07a387f28cc268266353db964ca8baf96e6d.tar.bz2
radio-bot-bd1d07a387f28cc268266353db964ca8baf96e6d.zip
Removes Restriction to execute commands
Diffstat (limited to 'src')
-rw-r--r--src/commands/radioStart.js3
-rw-r--r--src/main.js1
2 files changed, 2 insertions, 2 deletions
diff --git a/src/commands/radioStart.js b/src/commands/radioStart.js
index 0f0b5f7..799a369 100644
--- a/src/commands/radioStart.js
+++ b/src/commands/radioStart.js
@@ -3,7 +3,7 @@ const axios = require('axios').default;
const instance = axios.create({
baseURL: 'http://retrowave.ru/api/v1'
});
-
+require('dotenv').config();
const resourceUrl = 'http://retrowave.ru'
async function broadcastRadio(client, args, message, voiceChannel, textChannel) {
@@ -39,6 +39,7 @@ async function getNextMusic() {
module.exports = {
async execute(client, message, args) {
+ if(message.author.id !== process.env.ADMIN_ID) return;
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 (!NOW_PLAYING_CHANNEL) return message.reply(`Please add NOW_PLAYING_CHANNEL to .env with a Text Channel ID`);
diff --git a/src/main.js b/src/main.js
index 1685d3d..c45d1fe 100644
--- a/src/main.js
+++ b/src/main.js
@@ -9,7 +9,6 @@ const CMD_PREFIX = "!";
client.on('message', (message) => {
if (message.author.bot) return;
- if(message.author.id !== process.env.ADMIN_ID) return;
if (message.content.startsWith(CMD_PREFIX)) {
const commandReply = parseCMD(message);
}