3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-03-15 05:41:51 +00:00

Fix dash not being matched in invite codes

This commit is contained in:
Dragory 2020-08-27 23:11:39 +03:00
parent e55375fb25
commit 16740c9029
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1

View file

@ -500,7 +500,7 @@ export function parseInviteCodeInput(str: string): string {
}
export function getInviteCodesInString(str: string): string[] {
const inviteCodeRegex = /(?:discord.gg|discordapp.com\/invite|discord.com\/invite)\/([a-z0-9]+)/gi;
const inviteCodeRegex = /(?:discord.gg|discordapp.com\/invite|discord.com\/invite)\/([a-z0-9\-]+)/gi;
return Array.from(str.matchAll(inviteCodeRegex)).map(m => m[1]);
}