PythonistaGuild / TwitchIO

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

Client :: etch_stream search option "language" is not counted as option #374

Closed ccppoo closed 1 year ago

ccppoo commented 1 year ago

from Client class method fetch_streams

at the line preventing empty query options there are assert (Line 676)

https://github.com/TwitchIO/TwitchIO/blob/bd73cc53751282eeaac16c83f3cce207a5bc5763/twitchio/client.py#L674-L685

From docs, fetch_stream query options are optional

should be changed to

assert user_ids or game_ids or user_logins or languages

So people could use fetch_streams searching for specific language stream


example:

class Bot(Client):
    # ...

    async def event_ready(self):
        await self.fetch_streams(languages=["ko", "jp"])

this throws me an AssertionError

github-actions[bot] commented 1 year ago

Hello! Thanks for the issue. If this is a general help question, for a faster response consider joining the official Discord Server

Else if you have an issue with the library please wait for someone to help you here.

chillymosh commented 1 year ago

This has already been raised in https://github.com/TwitchIO/TwitchIO/issues/365

IAmTomahawkx commented 1 year ago

Tracked in #365