3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-10 20:35:02 +00:00

djs typings: Attachment & Util

Signed-off-by: GitHub <noreply@github.com>
This commit is contained in:
metal 2023-03-11 14:41:04 +00:00 committed by GitHub
parent aad4ad82a5
commit 010451c7e7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 49 additions and 44 deletions

View file

@ -1,4 +1,3 @@
import { Util } from "discord.js";
import escapeStringRegexp from "escape-string-regexp";
import * as t from "io-ts";
import { allowTimeout } from "../../../RegExpRunner";
@ -11,6 +10,7 @@ import { mergeRegexes } from "../../../utils/mergeRegexes";
import { mergeWordsIntoRegex } from "../../../utils/mergeWordsIntoRegex";
import { PhishermanPlugin } from "../../Phisherman/PhishermanPlugin";
import { phishermanDomainIsSafe } from "../../../data/Phisherman";
import { escapeInlineCode } from "discord.js";
interface MatchResultType {
type: MatchableTextType;
@ -186,7 +186,7 @@ export const MatchLinksTrigger = automodTrigger<MatchResultType>()({
renderMatchInformation({ pluginData, contexts, matchResult }) {
const partialSummary = getTextMatchPartialSummary(pluginData, matchResult.extra.type, contexts[0]);
let information = `Matched link \`${Util.escapeInlineCode(matchResult.extra.link)}\``;
let information = `Matched link \`${escapeInlineCode(matchResult.extra.link)}\``;
if (matchResult.extra.details) {
information += ` ${matchResult.extra.details}`;
}