Fix dash not being matched in invite codes
This commit is contained in:
parent
e55375fb25
commit
16740c9029
1 changed files with 1 additions and 1 deletions
|
@ -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]);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue