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:
parent
3667f4a3fb
commit
d9140ff7a8
1 changed files with 11 additions and 2 deletions
|
@ -1,7 +1,15 @@
|
||||||
import * as t from "io-ts";
|
import * as t from "io-ts";
|
||||||
import { automodAction } from "../helpers";
|
import { automodAction } from "../helpers";
|
||||||
import { LogType } from "../../../data/LogType";
|
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 { resolveActionContactMethods } from "../functions/resolveActionContactMethods";
|
||||||
import { ModActionsPlugin } from "../../ModActions/ModActionsPlugin";
|
import { ModActionsPlugin } from "../../ModActions/ModActionsPlugin";
|
||||||
import { TextChannel } from "eris";
|
import { TextChannel } from "eris";
|
||||||
|
@ -47,7 +55,8 @@ export const AlertAction = automodAction({
|
||||||
messageLink: theMessageLink,
|
messageLink: theMessageLink,
|
||||||
logMessage,
|
logMessage,
|
||||||
});
|
});
|
||||||
channel.createMessage(rendered);
|
|
||||||
|
await createChunkedMessage(channel, rendered);
|
||||||
} else {
|
} else {
|
||||||
logs.log(LogType.BOT_ALERT, {
|
logs.log(LogType.BOT_ALERT, {
|
||||||
body: `Invalid channel id \`${actionConfig.channel}\` for alert action in automod rule **${ruleName}**`,
|
body: `Invalid channel id \`${actionConfig.channel}\` for alert action in automod rule **${ruleName}**`,
|
||||||
|
|
Loading…
Add table
Reference in a new issue