add Role to Member in TypeScript is not known #8413
-
Which package is this bug report for?discord.js Issue descriptionToday I wanted to create a role menu. I wrote this in Code sampleif(interaction.isSelectMenu() && interaction.customId === "menu"){
interaction.member.roles.add(roleID);
} Package version14.1.2 Node.js version18.6.0 Operating systemWindows Priority this issue should haveMedium (should be fixed soon) Which partials do you have configured?GuildMember, Message Which gateway intents are you subscribing to?Guilds, GuildMembers, GuildVoiceStates, GuildMessages I have tested this issue on a development releaseNo response |
Beta Was this translation helpful? Give feedback.
Answered by
almeidx
Aug 1, 2022
Replies: 1 comment 3 replies
-
Typeguard the interaction using |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
kyranet
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Typeguard the interaction using
interaction.inCachedGuild()
, otherwiseinteraction.member
could be anAPIGuildMember
, in which case.roles
would be an array of snowflakes