From 4bc986c7af0285474e6f215af116969792bc6039 Mon Sep 17 00:00:00 2001 From: Abheek Dhawan Date: Fri, 2 Apr 2021 22:30:12 -0500 Subject: [PATCH] Use cache to map roles --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 710713e..c972356 100644 --- a/index.js +++ b/index.js @@ -141,7 +141,7 @@ async function userInfo(message) { const userInfoEmbed = new Discord.MessageEmbed() .setAuthor(member.user.tag, member.user.avatarURL()) - .addField("Roles", member.roles.map(r => `${r}`).join(' • ')) + .addField("Roles", member.roles.cache.map(r => `${r}`).join(' • ')) .setColor("00c5ff") .setFooter("User ID: ", member.user.id) .setTimestamp();