From 5ab65a701e773d8bda88a87ce3baf7ef604ac003 Mon Sep 17 00:00:00 2001 From: Dragory Date: Sat, 24 Feb 2018 13:02:54 +0200 Subject: [PATCH] Save username + blocked by id with !block --- src/main.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main.js b/src/main.js index 42c7fa1..59f0050 100644 --- a/src/main.js +++ b/src/main.js @@ -185,7 +185,8 @@ addInboxServerCommand('close', async (msg, args, thread) => { addInboxServerCommand('block', (msg, args, thread) => { async function block(userId) { - await blocked.block(userId); + const user = bot.users.get(userId); + await blocked.block(userId, (user ? `${user.username}#${user.discriminator}` : ''), msg.author.id); msg.channel.createMessage(`Blocked <@${userId}> (id ${userId}) from modmail`); }