automod: allow alert action to send messages >2000 chars long
This commit is contained in:
parent
3667f4a3fb
commit
d9140ff7a8
1 changed files with 11 additions and 2 deletions
|
@ -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}**`,
|
||||
|
|
Loading…
Add table
Reference in a new issue