3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-03-15 05:41:51 +00:00

ModActions: log sent DMs

This commit is contained in:
Dragory 2019-03-16 15:44:20 +02:00
parent ba3af1cb63
commit d5a902bcdd

View file

@ -1,4 +1,4 @@
import { decorators as d, IPluginOptions, waitForReaction, waitForReply } from "knub";
import { decorators as d, IPluginOptions, logger, waitForReaction, waitForReply } from "knub";
import { Attachment, Constants as ErisConstants, Guild, Member, Message, TextChannel, User } from "eris";
import humanizeDuration from "humanize-duration";
import { GuildCases } from "../data/GuildCases";
@ -1259,6 +1259,7 @@ export class ModActionsPlugin extends ZeppelinPlugin<IModActionsPluginConfig, IM
try {
const dmChannel = await this.bot.getDMChannel(user.id);
await dmChannel.createMessage(str);
logger.info(`Sent DM to ${user.id}: ${str}`);
return {
status: MessageResultStatus.DirectMessaged,
text: "user notified with a direct message",