Skip to content

Commit 82091c6

Browse files
authored
Implement "patch_channel" in User class (#212)
Implement "patch_channel" in User class
1 parent e6f9bb0 commit 82091c6

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

twitchio/user.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -693,7 +693,32 @@ async def create_prediction(
693693
)
694694
return Prediction(self._http, data[0])
695695

696+
async def modify_stream(
697+
self, token: str, game_id: int = None, language: str = None, title: str = None
698+
):
699+
"""|coro|
700+
Modify stream information
701+
702+
Parameters
703+
-----------
704+
token: :class:`str`
705+
An oauth token with the channel:manage:broadcast scope
706+
game_id: :class:`int`
707+
Optional game ID being played on the channel. Use 0 to unset the game.
708+
language: :class:`str`
709+
Optional language of the channel. A language value must be either the ISO 639-1 two-letter code for a supported stream language or “other”.
710+
title: :class:`str`
711+
Optional title of the stream.
712+
"""
713+
await self._http.patch_channel(
714+
token,
715+
broadcaster_id=str(self.id),
716+
game_id=str(game_id),
717+
language=language,
718+
title=title,
719+
)
696720

721+
697722
class BitLeaderboardUser(PartialUser):
698723

699724
__slots__ = "rank", "score"

0 commit comments

Comments
 (0)