Save username + blocked by id with !block

master
Dragory 2018-02-24 13:02:54 +02:00
parent 3e2954f4e3
commit 5ab65a701e
1 changed files with 2 additions and 1 deletions

View File

@ -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`);
}