mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 13:06:50 +00:00
Also normalize interaction tokens in URLs
This commit is contained in:
parent
9bbe9df16d
commit
84fb49e57c
1 changed files with 3 additions and 1 deletions
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
|
|
@ -53,6 +53,8 @@ namespace PluralKit.Bot
|
|||
url = Regex.Replace(url, @"/reactions/[^{/]+/\d+", "/reactions/{emoji}/{user_id}");
|
||||
url = Regex.Replace(url, @"/reactions/[^{/]+", "/reactions/{emoji}");
|
||||
url = Regex.Replace(url, @"/invites/[^{/]+", "/invites/{invite_code}");
|
||||
url = Regex.Replace(url, @"/interactions/\d+/[^{/]+", "/interactions/{interaction_id}/{interaction_token}");
|
||||
url = Regex.Replace(url, @"/interactions/\d+", "/interactions/{interaction_id}");
|
||||
|
||||
// catch-all for missed IDs
|
||||
url = Regex.Replace(url, @"\d{17,19}", "{snowflake}");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue