From 29b13b3d1f8d47151cd23f17d05ab8f4577826d5 Mon Sep 17 00:00:00 2001 From: Cynthia Date: Sat, 10 Dec 2022 15:20:19 -0700 Subject: [PATCH] music: fix urls not working --- src/modules/music.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/modules/music.js b/src/modules/music.js index 351b1ad..e285738 100644 --- a/src/modules/music.js +++ b/src/modules/music.js @@ -423,11 +423,12 @@ command.usage = "help"; command.callback = async function ( msg, line, - [subcommand, ...args], + args, {shuffle = false, limit = -1, offset = 0, next = false} ) { if (!msg.guildID) return "This command can only be used in guilds."; + const subcommand = args.shift(); let argStr = args.join(" "); switch (subcommand) { @@ -539,7 +540,7 @@ command.callback = async function ( }); } } else { - if (argStr.match(/https?:\/\//)) { + if (argStr.match(/^https?:\/\//)) { const contentType = await fetch(argStr).then((res) => res.headers.get("Content-Type") );