From 5d5d13689181085866877b0d7d003f8a76fa0f1a Mon Sep 17 00:00:00 2001 From: Dragory Date: Tue, 15 Jan 2019 04:26:02 +0200 Subject: [PATCH] Logs: use createChunkedMessage for log messages --- src/plugins/Logs.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/plugins/Logs.ts b/src/plugins/Logs.ts index 69bca158..1bc346ef 100644 --- a/src/plugins/Logs.ts +++ b/src/plugins/Logs.ts @@ -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); } } }