Gikkman / Java-Twirk

Small, basic library for communication via the Twitch chat. Java 8 compatible
MIT License
54 stars 22 forks source link

add isOwner to TwitchUser #9

Closed RebelliousUno closed 6 years ago

RebelliousUno commented 7 years ago

I'm liking the library, but one thing I've noticed coming into this is that isMod doesn't cover the channel so I'm having to do

if (sender.isMod || sender.userType == USER_TYPE.OWNER) {
                twirk.channelMessage("Mods Only Message")
}

A handy isOwner would be a nice to have on the TwitchUser interface

Gikkman commented 7 years ago

Hm, I hadn't thought of it but you are definitely correct. Will add it with the next update

Gikkman commented 7 years ago

Also, if you want something that emulates "mod or higher", you can do the following:

if (sender.userType.value >= USER_TYPE.MOD.value ) {
    // something
} 

( I will still add the isOwner method =) )

RebelliousUno commented 7 years ago

Thanks, that's useful to know

On Sat, 22 Jul 2017 at 10:42 Simon notifications@github.com wrote:

Also, if you want something that emulates "mod or higher", you can do the following:

if (sender.userType.value >= USER_TYPE.MOD.value ) { // something }

( I will still add the isOwner method =) )

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Gikkman/Java-Twirk/issues/9#issuecomment-317171303, or mute the thread https://github.com/notifications/unsubscribe-auth/AA_7EUG_wRtYe_KC1hs1A6FYw18tvqm9ks5sQcPvgaJpZM4OZxSX .

Gikkman commented 6 years ago

This was fixed in #13