fixed bug

This commit is contained in:
Neko Life 2021-05-10 13:41:55 +00:00
parent bd59af61b0
commit 5408b98b83

View file

@ -33,7 +33,7 @@ module.exports = class avatar extends commando.Command {
avatar = msg.author.displayAvatarURL({size:4096,dynamic:true});
}
let onceOnly = false;
if (msg.guild && !msg.guild.member(msg.author).hasPermission("MANAGE_MESSAGES")) {
if (!msg.guild?.member(msg.author).hasPermission("MANAGE_MESSAGES")) {
onceOnly = true;
if (args.length > 1) {
trySend(this.client, msg, "Manage messages permission required to show two or more avatar at once!");