Add flags regex and appeals to descriptions

This commit is contained in:
Tarrgon
2026-06-02 21:18:57 -04:00
parent d77222f2ae
commit 24cd800075
4 changed files with 20 additions and 8 deletions
+13 -3
View File
@@ -1,7 +1,7 @@
import { EmbedAuthorOptions, APIEmbedField } from 'discord.js';
import { APIEmbedField, EmbedAuthorOptions } from 'discord.js';
import { config } from '../config';
import { getE621Post, spoilerOrBlacklist, PostAction } from './e621-utils';
import { blipIDRegex, commentIDRegex, forumTopicIDRegex, poolIDRegex, postIDRegex, recordIDRegex, searchLinkRegex, setIDRegex, takedownIDRegex, ticketIDRegex, userIDRegex, wikiLinkRegex } from './message-matcher-regex';
import { getE621Post, PostAction, spoilerOrBlacklist } from './e621-utils';
import { appealIDRegex, blipIDRegex, commentIDRegex, flagIDRegex, forumTopicIDRegex, poolIDRegex, postIDRegex, recordIDRegex, searchLinkRegex, setIDRegex, takedownIDRegex, ticketIDRegex, userIDRegex, wikiLinkRegex } from './message-matcher-regex';
// TODO: Condense this and the message event handler regex array.
const linkReplacers = [
@@ -62,6 +62,16 @@ const linkReplacers = [
replacement: '/tickets/{match}',
encodeURI: false
},
{
regex: appealIDRegex,
replacement: '/appeals/{match}',
encodeURI: false
},
{
regex: flagIDRegex,
replacement: '/flags/{match}',
encodeURI: false
},
{
regex: userIDRegex,
replacement: '/users/{match}',