From 4209113dc0b59fb2245f2707f69edd7d1f206b34 Mon Sep 17 00:00:00 2001 From: moosecrab Date: Thu, 9 Jun 2022 16:45:45 -0700 Subject: [PATCH] Fix in regular expressions for compat with ytdl-core. --- bot.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot.js b/bot.js index f62a04c..7c8653a 100644 --- a/bot.js +++ b/bot.js @@ -152,7 +152,7 @@ client.on('message', async message => { // Check for youtube play command const ytmatch = message.content.match(/(?<=!play (https?:\/\/)(www\.)?youtu((be\.com\/watch\?v=)|(\.be\/)))[\w-]{11}/); if (ytmatch && message.member.voice.channel) { - const timematch = message.content.match(/t=(\d{1,2}h)?(\d{1,2}m)?\d{1,4}s?(?=$)/); + const timematch = message.content.match(/(?<=t=)(\d{1,2}h)?(\d{1,2}m)?\d{1,4}s?(?=$)/); var timestamp = '0'; if (timematch) { timestamp = timematch[0];