diff options
author | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2022-03-28 15:15:34 -0400 |
---|---|---|
committer | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2022-03-28 15:15:34 -0400 |
commit | 4de8924e8b741becf6d3a794a40ac687368da7cd (patch) | |
tree | 732f0a8f9e56fad7086ef51e9fbb4cd6b241fd1f /src/lib/utils | |
parent | 977fbe4741ff141f0d28d5fae18f6e08bedce782 (diff) | |
download | tanzanite-4de8924e8b741becf6d3a794a40ac687368da7cd.tar.gz tanzanite-4de8924e8b741becf6d3a794a40ac687368da7cd.tar.bz2 tanzanite-4de8924e8b741becf6d3a794a40ac687368da7cd.zip |
feat: message quoting
Diffstat (limited to 'src/lib/utils')
-rw-r--r-- | src/lib/utils/BushConstants.ts | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/lib/utils/BushConstants.ts b/src/lib/utils/BushConstants.ts index 8d35522..df69806 100644 --- a/src/lib/utils/BushConstants.ts +++ b/src/lib/utils/BushConstants.ts @@ -154,9 +154,13 @@ export class BushConstants { discordEmoji: /<a?:(?<name>[a-zA-Z0-9_]+):(?<id>\d{15,21})>/im, - //stolen from geek + /* + * Taken with permission from Geek: + * https://github.com/FireDiscordBot/bot/blob/5d1990e5f8b52fcc72261d786aa3c7c7c65ab5e8/lib/util/constants.ts#L276 + */ + /** **This has the global flag, make sure to handle it correctly.** */ messageLink: - /(?:ptb\.|canary\.|staging\.|lc\.)?(?:discord(?:app)?)\.(?:com)?\/channels\/(?<guild_id>\d{15,21}|@me)\/(?<channel_id>\d{15,21})\/(?<message_id>\d{15,21})/im + /<?(?:ptb\.|canary\.|staging\.)?discord(?:app)?\.com?\/channels\/(?<guild_id>\d{15,21})\/(?<channel_id>\d{15,21})\/(?<message_id>\d{15,21})>?/gim } as const); /** |