add: Added .q support for invidious. If you have ytProvider set to invidious in data/searches.yml, invidious will be used to queue up songs and play them."work

This commit is contained in:
Kwoth
2024-09-18 13:26:34 +00:00
parent e4202b33f5
commit 0326e88910
25 changed files with 327 additions and 87 deletions

View File

@@ -0,0 +1,10 @@
using System.Text.RegularExpressions;
namespace NadekoBot.Modules.Music;
public sealed class YoutubeHelpers
{
public static Regex YtVideoIdRegex { get; } =
new(@"(?:youtube\.com\/\S*(?:(?:\/e(?:mbed))?\/|watch\?(?:\S*?&?v\=))|youtu\.be\/)(?<id>[a-zA-Z0-9_-]{6,11})",
RegexOptions.Compiled);
}