JnCrMx / discord-game-sdk4j

Java bindings for Discord's Game SDK
MIT License
122 stars 23 forks source link

No way to set CreateFlags to NoRequireDiscord #24

Closed artemiswkearney closed 3 years ago

artemiswkearney commented 3 years ago

The CreateFlags enum has two values in the Discord docs, but this library only provides CreateParams.getDefaultFlags(), and it doesn't look like Discord has documented anywhere what long value NoRequireDiscord corresponds to.

JnCrMx commented 3 years ago

Oh, thanks for bringing this up. I need to fix this since quite some time. I will add some constants or an enum (Which would you prefer?) for that.

For now: NoRequireDiscord corresponds to the value of 1.

enum EDiscordCreateFlags {
    DiscordCreateFlags_Default = 0,
    DiscordCreateFlags_NoRequireDiscord = 1,
};
artemiswkearney commented 3 years ago

I'm not sure what's idiomatic in Java, but an enum sounds good?

JnCrMx commented 3 years ago

Please have a look at #26 and tell me what you think about it

artemiswkearney commented 3 years ago

Looks like a good solution, if a bit overkill for a single flag. (Maybe they'll add more someday?)