diff options
Diffstat (limited to 'commands/nick.js')
| -rw-r--r-- | commands/nick.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/commands/nick.js b/commands/nick.js index f65bf74..8fcdce7 100644 --- a/commands/nick.js +++ b/commands/nick.js @@ -1,7 +1,7 @@ /** ************************************** * * Nick: Command for AleeBot - * Copyright (C) 2017-2020 Alee Productions + * Copyright (C) 2017-2021 Alee Productions * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -18,7 +18,7 @@ * * *************************************/ module.exports.run = async (client, message, args) => { - if (!message.guild.member(client.user).hasPermission('MANAGE_NICKNAME')) return message.reply('**ERROR:** I can\'t change nicknames. (Check permissions)'); + if (!message.guild.members.cache.get(client.user.id).permissions.has('MANAGE_NICKNAME')) return message.reply('**ERROR:** I can\'t change nicknames. (Check permissions)'); const nick = args.join(' '); message.member.setNickname(nick); message.channel.send(`Alright! I changed your nickname to \`${nick}\``); |
