From 45b00395a7aa53e5e704e84600a80f81ed770b10 Mon Sep 17 00:00:00 2001 From: Marius Begby Date: Fri, 25 Aug 2023 20:40:26 +0200 Subject: [PATCH] chore: remove comments --- src/commands/player/play.js | 22 ---------------------- src/utils/factory/createPlayer.js | 17 ----------------- 2 files changed, 39 deletions(-) diff --git a/src/commands/player/play.js b/src/commands/player/play.js index 74c4d56..366c0c4 100644 --- a/src/commands/player/play.js +++ b/src/commands/player/play.js @@ -100,28 +100,6 @@ module.exports = { }); } - /* seems to be supported with @distube/ytdl-core, keeping it commented out to test functionality - if ( - searchResult.tracks[0].raw.live && - searchResult.tracks[0].raw.duration === 0 && - searchResult.tracks[0].source === 'youtube' - ) { - logger.debug( - `[Shard ${interaction.guild.shardId}] Unsupported audio source. Query: ${query}. Track is live, 0 duration and from YouTube.` - ); - - return await interaction.editReply({ - embeds: [ - new EmbedBuilder() - .setDescription( - `**${embedOptions.icons.warning} Unsupported audio source**\nYouTube live streams are currently not supported. This is due to issues with extracting audio from the livestream.\n\n_If you think this message is incorrect, please submit a bug report in the **[support server](${botOptions.serverInviteUrl})**._` - ) - .setColor(embedOptions.colors.warning) - ] - }); - } - */ - queue = useQueue(interaction.guild.id); let queueSize = queue?.size ?? 0; diff --git a/src/utils/factory/createPlayer.js b/src/utils/factory/createPlayer.js index 838ab99..34f6475 100644 --- a/src/utils/factory/createPlayer.js +++ b/src/utils/factory/createPlayer.js @@ -22,23 +22,6 @@ exports.createPlayer = async (client) => { // primarily to be able to use it in broadcastEval and other sharding methods global.player = player; - /* Seems to not be needed with @distube/ytdl-core, long duration videos work fine, keeping commented for now - onBeforeCreateStream(async (track) => { - if (track.source === 'youtube') { - return ( - await stream(track.url, { - type: 'audio', - quality: 'high', - highWaterMark: 1 << 25, - cookie: process.env.YT_COOKIE || '' - }) - ).stream; - } - - return null; - }); - */ - await player.extractors.loadDefault(); logger.trace(`[Shard ${client.shard.ids[0]}] discord-player loaded dependencies:\n${player.scanDeps()}`);