Also normalize interaction tokens in URLs
This commit is contained in:
parent
9bbe9df16d
commit
84fb49e57c
@ -1,4 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Linq;
|
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/[^{/]+/\d+", "/reactions/{emoji}/{user_id}");
|
||||||
url = Regex.Replace(url, @"/reactions/[^{/]+", "/reactions/{emoji}");
|
url = Regex.Replace(url, @"/reactions/[^{/]+", "/reactions/{emoji}");
|
||||||
url = Regex.Replace(url, @"/invites/[^{/]+", "/invites/{invite_code}");
|
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
|
// catch-all for missed IDs
|
||||||
url = Regex.Replace(url, @"\d{17,19}", "{snowflake}");
|
url = Regex.Replace(url, @"\d{17,19}", "{snowflake}");
|
||||||
|
Loading…
Reference in New Issue
Block a user