diff --git a/bot.js b/bot.js index 3930c00..f97747f 100644 --- a/bot.js +++ b/bot.js @@ -130,7 +130,7 @@ client.on( Events.MessageCreate, async message => { if (message.content.startsWith('!play') && message.member.voice.channel) { console.log(`!play issued by ${message.author.tag} ${message.author.id}`); // Determine if we have a URL or a search term - const ytmatch = message.content.match(/(?<=(https?:\/\/)(www\.)?youtu((be\.com\/watch\?v=)|(\.be\/)))[\w-]{11,12}/); + const ytmatch = message.content.match(/(?<=(https?:\/\/)(www\.)?youtu((be\.com\/(watch\?v=)|(shorts\/))|(\.be\/)))[\w-]{11,12}/); var yturl = null; var timestamp = '0' if (ytmatch) {