3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-03-15 05:41:51 +00:00

automod: allow alert action to send messages >2000 chars long

This commit is contained in:
Dragory 2020-09-15 01:57:46 +03:00
parent 3667f4a3fb
commit d9140ff7a8
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1

View file

@ -1,7 +1,15 @@
import * as t from "io-ts";
import { automodAction } from "../helpers";
import { LogType } from "../../../data/LogType";
import { asyncMap, messageLink, resolveMember, stripObjectToScalars, tNullable } from "../../../utils";
import {
asyncMap,
createChunkedMessage,
isDiscordRESTError,
messageLink,
resolveMember,
stripObjectToScalars,
tNullable,
} from "../../../utils";
import { resolveActionContactMethods } from "../functions/resolveActionContactMethods";
import { ModActionsPlugin } from "../../ModActions/ModActionsPlugin";
import { TextChannel } from "eris";
@ -47,7 +55,8 @@ export const AlertAction = automodAction({
messageLink: theMessageLink,
logMessage,
});
channel.createMessage(rendered);
await createChunkedMessage(channel, rendered);
} else {
logs.log(LogType.BOT_ALERT, {
body: `Invalid channel id \`${actionConfig.channel}\` for alert action in automod rule **${ruleName}**`,