From e59ccaf3ff6078f81c0738e4b016afd9b9e77477 Mon Sep 17 00:00:00 2001 From: MoSiren Date: Tue, 11 Jun 2024 19:39:46 +0000 Subject: [PATCH] Updated Bcfy voice commands to be there own. --- config.json.template | 2 ++ index.js | 17 ++++++++++------- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/config.json.template b/config.json.template index 8df2059..97876e1 100644 --- a/config.json.template +++ b/config.json.template @@ -26,6 +26,8 @@ "username": "YOUR_USERNAME", "password": "YOUR_PASSWORD" }, + "voice_enabled": true, + "uptime-kuma": { "enabled": false, "url": "", diff --git a/index.js b/index.js index a3b5d37..07f1255 100644 --- a/index.js +++ b/index.js @@ -606,11 +606,6 @@ discord.on('ready', async () => { if (config.broadcastify.enabled) { // Add commands to join vc, leave vc, and play stream commands.push( - { - "name": "leave", - "description": "Leave the current voice chat", - "default_member_permissions": 0 - }, { "name": "playbcfy", "description": "Play the broadcastify stream", @@ -622,6 +617,16 @@ discord.on('ready', async () => { "required": true } ] + } + ) + } + if (config.voice_enabled) { + // Add commands to join vc, leave vc, and play stream + commands.push( + { + "name": "leave", + "description": "Leave the current voice chat", + "default_member_permissions": 0 }, { "name": "play", @@ -654,7 +659,6 @@ discord.on('ready', async () => { } ) } - await (async () => { try { //Global @@ -1035,7 +1039,6 @@ discord.on("interactionCreate", async (interaction) => { case "leave": // Leave broadcastify stream if (!interaction.inGuild()) return interaction.reply({ content: "This command can only be used in a guild", ephemeral: true }); - if (!config.broadcastify.enabled) return interaction.reply({ content: "Broadcastify is not enabled", ephemeral: true }); channel = interaction.member.voice.channel; if (!channel) return interaction.reply({ content: "You need to be in a voice channel", ephemeral: true }); res = LeaveVoiceChannel(channel)