We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BitField
discord.js
Due to the use of enums flags have reverse values. If we use string bit filed the bit resolves to the key instead of the value.
discord.js/packages/discord.js/src/util/BitField.js
Lines 166 to 169 in 9842082
import { GuildMemberFlagsBitField } from 'discord.js'; const permission1 = new GuildMemberFlagsBitField('1'); const permission2 = new GuildMemberFlagsBitField('2'); const permission3 = new GuildMemberFlagsBitField('3'); console.log(permission1.bitfield); // 'DidRejoin' console.log(permission2.bitfield); // 'CompletedOnboarding' console.log(permission3.bitfield); // 3 console.log(GuildMemberFlagsBitField.Flags); /** { '1': 'DidRejoin', '2': 'CompletedOnboarding', '4': 'BypassesVerification', '8': 'StartedOnboarding', DidRejoin: 1, CompletedOnboarding: 2, BypassesVerification: 4, StartedOnboarding: 8 } **/
14.8.0
18.15.0
Win 11
Medium (should be fixed soon)
No Partials
No Intents
No response
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Which package is this bug report for?
discord.js
Issue description
Due to the use of enums flags have reverse values. If we use string bit filed the bit resolves to the key instead of the value.
discord.js/packages/discord.js/src/util/BitField.js
Lines 166 to 169 in 9842082
Code sample
Package version
14.8.0
Node.js version
18.15.0
Operating system
Win 11
Priority this issue should have
Medium (should be fixed soon)
Which partials do you have configured?
No Partials
Which gateway intents are you subscribing to?
No Intents
I have tested this issue on a development release
No response
The text was updated successfully, but these errors were encountered: