ApplicationCommand & PermissionFlagsBits
I recently refactored my static Command files to store the SlashCommands, and underlying SubCommands, SubCommandGroups and CommandOptions, in my DB (I consider this Metadata) and expanded on the different fields available. (Like NSFW, DmPermission, etc)
For the .setDefaultMemberPermissions() method, what would be the best way to store this?
Was considering in string form, e.g. "2 | 4" with the numbers representing KICK_MEMBERS and BAN_MEMBERS respectfully.
5 Replies
- What's your exact discord.js
npm list discord.js
and node node -v
version?
- Not a discord.js issue? Check out #other-js-ts.
- Consider reading #how-to-get-help to improve your question!
- Explain what exactly your issue is.
- Post the full error stack trace, not just the top part!
- Show your code!
- Issue solved? Press the button!
- ✅
Marked as resolved by OPA bigint
Forgive my ignorance with DataBase Data storage, is it safe to assume I can store 2 | 4 as a BigInt?
Or do I need to use a ForeignKey?
| is a bitwise or, which makes 2 | 4 = 6
You save it as 6
I feel like such an idiot at the moment. XD
The reason is I would have liked to keep the different Flags separated, easier to read when SELECTing in the DB.
I'll store the result of the bitwise then.
Thank you Magic Wizard!🤩