The current invite regex is too permissive. It captures any non-space character, while invite codes can only have letters and numbers.
|
r"(?P<invite>\S+)", # the invite code itself |
In c9daa6f we made it go until the whitespace because of the way the Discord client parses invites, but we can safely account for it by adding / to the character class instead (i.e [a-zA-Z0-9/-]).