3636 from .http import TwitchHTTP
3737 from .channel import Channel
3838 from .models import BitsLeaderboard , Clip , ExtensionBuilder , Tag , FollowEvent , Prediction
39-
40-
4139__all__ = (
4240 "PartialUser" ,
4341 "BitLeaderboardUser" ,
@@ -161,7 +159,6 @@ async def get_custom_rewards(
161159 """
162160 if not force and self ._cached_rewards and self ._cached_rewards [0 ] + 300 > time .monotonic ():
163161 return self ._cached_rewards [1 ]
164-
165162 try :
166163 data = await self ._http .get_rewards (token , self .id , only_manageable , ids )
167164 except Unauthorized as error :
@@ -448,7 +445,6 @@ async def fetch_follow(self, to_user: "PartialUser", token: str = None):
448445 """
449446 if not isinstance (to_user , PartialUser ):
450447 raise TypeError (f"to_user must be a PartialUser not { type (to_user )} " )
451-
452448 from .models import FollowEvent
453449
454450 data = await self ._http .get_user_follows (from_id = str (self .id ), to_id = str (to_user .id ))
@@ -741,7 +737,6 @@ async def modify_stream(self, token: str, game_id: int = None, language: str = N
741737 """
742738 if game_id is not None :
743739 game_id = str (game_id )
744-
745740 await self ._http .patch_channel (
746741 token ,
747742 broadcaster_id = str (self .id ),
@@ -941,7 +936,9 @@ async def fetch_chat_settings(self, moderator_id: Optional[int] = None, token: O
941936 """
942937 from .models import ChatSettings
943938
944- data = await self ._http .get_chat_settings (broadcaster_id = str (self .id ), moderator_id = str (moderator_id ), token = token )
939+ data = await self ._http .get_chat_settings (
940+ broadcaster_id = str (self .id ), moderator_id = str (moderator_id ), token = token
941+ )
945942 return ChatSettings (self ._http , data [0 ])
946943
947944 async def update_chat_settings (
@@ -956,8 +953,8 @@ async def update_chat_settings(
956953 subscriber_mode : Optional [bool ] = None ,
957954 unique_chat_mode : Optional [bool ] = None ,
958955 non_moderator_chat_delay : Optional [bool ] = None ,
959- non_moderator_chat_delay_duration : Optional [int ] = None
960- ):
956+ non_moderator_chat_delay_duration : Optional [int ] = None ,
957+ ):
961958 """|coro|
962959
963960 Updates the current chat settings for this channel/broadcaster.
@@ -995,21 +992,24 @@ async def update_chat_settings(
995992 :class:`twitchio.ChatSettings`
996993 """
997994 from .models import ChatSettings
995+
998996 data = await self ._http .patch_chat_settings (
999997 broadcaster_id = str (self .id ),
1000998 moderator_id = str (moderator_id ),
1001- token = token , emote_mode = emote_mode ,
999+ token = token ,
1000+ emote_mode = emote_mode ,
10021001 follower_mode = follower_mode ,
10031002 follower_mode_duration = follower_mode_duration ,
10041003 slow_mode = slow_mode ,
10051004 slow_mode_wait_time = slow_mode_wait_time ,
10061005 subscriber_mode = subscriber_mode ,
10071006 unique_chat_mode = unique_chat_mode ,
10081007 non_moderator_chat_delay = non_moderator_chat_delay ,
1009- non_moderator_chat_delay_duration = non_moderator_chat_delay_duration
1010- )
1008+ non_moderator_chat_delay_duration = non_moderator_chat_delay_duration ,
1009+ )
10111010 return ChatSettings (self ._http , data [0 ])
10121011
1012+
10131013class BitLeaderboardUser (PartialUser ):
10141014
10151015 __slots__ = "rank" , "score"
0 commit comments