From 6744faa6e68972302bedcd3f2a67079f522cdb14 Mon Sep 17 00:00:00 2001 From: WatDuhHekBro <44940783+WatDuhHekBro@users.noreply.github.com> Date: Wed, 5 Aug 2020 22:21:36 -0500 Subject: [PATCH] Fixed userFlags --- src/commands/info.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/commands/info.ts b/src/commands/info.ts index 01c94f3..c858009 100644 --- a/src/commands/info.ts +++ b/src/commands/info.ts @@ -100,7 +100,8 @@ export default new Command({ .sort((a: { position: number; }, b: { position: number; }) => b.position - a.position) .map((role: { toString: () => any; }) => role.toString()) .slice(0, -1); - const userFlags = member.permissions.toArray(); + // @ts-ignore - Discord.js' typings seem to be outdated here. According to their v12 docs, it's User.fetchFlags() instead of User.flags. + const userFlags = (await member.user.fetchFlags() as UserFlags).toArray(); const embed = new MessageEmbed() .setThumbnail(member.user.displayAvatarURL({ dynamic: true, size: 512 }))