#ApplicationCommand & PermissionFlagsBits

6 messages · Page 1 of 1 (latest)

quaint breach
#

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.

winged elbowBOT
#
  • What's your exact discord.js npm list discord.js and node node -v version?
  • Not a discord.js issue? Check out #1081585952654360687.
  • 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 OP
winged spire
#

A bigint

quaint breach
# winged spire A 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?

winged spire
#

| is a bitwise or, which makes 2 | 4 = 6

2 0b010
4 0b100
6 0b110
#

You save it as 6