From 706867ae53e6c9739ec42c60e7b855d86fa0d342 Mon Sep 17 00:00:00 2001 From: supositware Date: Sun, 18 Apr 2021 21:28:12 +0200 Subject: [PATCH] Fixed error on guilds --- commands/owner/blacklist.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/commands/owner/blacklist.js b/commands/owner/blacklist.js index 714b90c0..2c9d6f86 100644 --- a/commands/owner/blacklist.js +++ b/commands/owner/blacklist.js @@ -45,8 +45,11 @@ class userBlacklistCommand extends Command { if (!blacklist) { const body = {type:args.command, uid: args.userID, reason: args.reason}; Blacklists.create(body); - let user = this.client.users.resolve(args.userID); - return message.channel.send(`${user.tag} has been blacklisted from ${args.command} with the following reason ${args.reason}`); + let user = args.userID; + if (args.command !== 'guild') + user = this.client.users.resolve(args.userID).tag; + + return message.channel.send(`${user} has been blacklisted from ${args.command} with the following reason ${args.reason}`); } else { message.channel.send('This user is already blacklisted, do you want to unblacklist him? y/n'); const filter = m => m.content && m.author.id === message.author.id;