Permit !play on /shorts/
Thanks @tks_ftw for helping confirm that short IDs and video IDs are in the same address space, and are interchangable
This commit is contained in:
parent
37027849fd
commit
3e7603412e
2
bot.js
2
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) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user