mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-03-15 05:41:51 +00:00
Logs: use createChunkedMessage for log messages
This commit is contained in:
parent
d2df233bc2
commit
5d5d136891
1 changed files with 3 additions and 2 deletions
|
@ -3,11 +3,13 @@ import { GuildLogs } from "../data/GuildLogs";
|
|||
import { LogType } from "../data/LogType";
|
||||
import { Channel, Constants as ErisConstants, Member, Message, TextChannel, User } from "eris";
|
||||
import {
|
||||
createChunkedMessage,
|
||||
deactivateMentions,
|
||||
disableCodeBlocks,
|
||||
disableLinkPreviews,
|
||||
findRelevantAuditLogEntry,
|
||||
formatTemplateString,
|
||||
noop,
|
||||
stripObjectToScalars,
|
||||
useMediaUrls
|
||||
} from "../utils";
|
||||
|
@ -99,8 +101,7 @@ export class LogsPlugin extends Plugin {
|
|||
|
||||
if ((opts.include && opts.include.includes(typeStr)) || (opts.exclude && !opts.exclude.includes(typeStr))) {
|
||||
const message = this.getLogMessage(type, data);
|
||||
// TODO: Split log messages that are too long
|
||||
if (message) await channel.createMessage(message).catch(() => {});
|
||||
if (message) await createChunkedMessage(channel, message).catch(noop);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue