PythonistaGuild / TwitchIO

An Async Bot/API wrapper for Twitch made in Python.
https://twitchio.dev
MIT License
798 stars 162 forks source link

is_subscriber not returning true for a user #164

Closed GavinEke closed 3 years ago

GavinEke commented 3 years ago

Describe the bug message.author.is_subscriber not returning true for a sub, this user has a founders badge and is a tier 3 not sure if either of these are the reason but they are subbed.

Are you using TwitchIO within a Discord Bot? Yes

What commit of TwitchIO are you using? Version: 1.2.1

To Reproduce

async def event_message(self, message):
    if message.author.is_subscriber:
        print(f"{message.author.name} is subbed")

Doesn't print for 1 user who is subbed, this person is a founder and tier 3 if that helps. The above does work for all other users I have seen.

Expected behaviour "Username is subbed" be printed to the console

Screenshots N/A

(please complete the following information):

Additional context N/A

GavinEke commented 3 years ago

I noticed other tier 3 subs return true for the is_subscriber so I am assuming it is something to do with the founders badge

GavinEke commented 3 years ago

The user badges are {'vip': '1', 'founder': '0'} for the user in question

IAmTomahawkx commented 3 years ago

Thanks

iarspider commented 3 years ago

It would be nice to have this forward-ported to 2.x :)

chillymosh commented 3 years ago

It would be nice to have this forward-ported to 2.x :)

It does exist message.author.is_subscriber (It's part of the chatter object)

iarspider commented 3 years ago

Yes, but it only checks for "subscriber" tag, not for "founder": https://github.com/TwitchIO/TwitchIO/blob/master/twitchio/chatter.py#L122 plus https://github.com/TwitchIO/TwitchIO/blob/master/twitchio/chatter.py#L179