I am fetching a member as:
...
private user: GuildMember;
...
try {
this.user = await interaction.guild?.members.fetch(SomeUserId)
}catch (e: unknown) {
return await interaction.editReply("Couldn't find the specific user the in server.")
}
this.user
will contain all the information regarding that specific. It also includes a field _roles:['123456789', '123456789']
. How can I get this specific field? Note that doing the following results in ‘_roles does not exist on type GuildMember’:
console.log(this.user._roles)
Any way to access this field?