Don't crash when sending a log message that is too long

This commit is contained in:
Dragory 2018-08-03 19:26:06 +03:00
parent be1c327093
commit 32856329b5

View file

@ -64,7 +64,8 @@ export class LogsPlugin extends Plugin {
(opts.exclude && !opts.exclude.includes(typeStr))
) {
const message = this.getLogMessage(type, data);
if (message) await channel.createMessage(message);
// TODO: Split log messages that are too long
if (message) await channel.createMessage(message).catch(() => {});
}
}
}