File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ Changelog
11
11
- twitchio
12
12
- Additions
13
13
- Added - :func: `~twitchio.PartialUser.fetch_hype_train_status `
14
+ - Added - :func: `~twitchio.PartialUser.fetch_stream `
14
15
15
16
16
17
3.1.0
Original file line number Diff line number Diff line change @@ -3477,6 +3477,16 @@ async def delete_custom_reward(
3477
3477
"""
3478
3478
await self ._http .delete_custom_reward (broadcaster_id = self .id , reward_id = id , token_for = self .id )
3479
3479
3480
+ async def fetch_stream (self ) -> Stream | None :
3481
+ """|coro|
3482
+
3483
+ Fetches the current stream for this broadcaster / user. If the broadcaster is not streaming then it will return `None`.
3484
+
3485
+ Returns
3486
+ -------
3487
+ Stream | None
3488
+ """
3489
+ return await anext (self ._http .get_streams (user_ids = [self .id ], max_results = 1 ), None )
3480
3490
3481
3491
class User (PartialUser ):
3482
3492
"""Represents a User.
You can’t perform that action at this time.
0 commit comments