@@ -157,6 +157,7 @@ def run(self):
157157
158158 async def start (self ):
159159 """|coro|
160+
160161 Connects to the twitch IRC server, and cleanly disconnects when done.
161162 """
162163 if self .loop is not asyncio .get_running_loop ():
@@ -171,12 +172,14 @@ async def start(self):
171172
172173 async def connect (self ):
173174 """|coro|
175+
174176 Connects to the twitch IRC server
175177 """
176178 await self ._connection ._connect ()
177179
178180 async def close (self ):
179181 """|coro|
182+
180183 Cleanly disconnects from the twitch IRC server
181184 """
182185 await self ._connection ._close ()
@@ -258,6 +261,7 @@ async def wait_for(
258261 ) -> Tuple [Any ]:
259262 """|coro|
260263
264+
261265 Waits for an event to be dispatched, then returns the events data
262266
263267 Parameters
@@ -305,6 +309,7 @@ def get_channel(self, name: str) -> Optional[Channel]:
305309 async def join_channels (self , channels : Union [List [str ], Tuple [str ]]):
306310 """|coro|
307311
312+
308313 Join the specified channels.
309314
310315 Parameters
@@ -355,6 +360,7 @@ async def fetch_users(
355360 force = False ,
356361 ) -> List [User ]:
357362 """|coro|
363+
358364 Fetches users from the helix API
359365
360366 Parameters
@@ -381,6 +387,7 @@ async def fetch_users(
381387 async def fetch_clips (self , ids : List [str ]):
382388 """|coro|
383389
390+
384391 Fetches clips by clip id.
385392 To fetch clips by user id, use :meth:`twitchio.PartialUser.fetch_clips`
386393
@@ -435,6 +442,7 @@ async def fetch_videos(
435442 language = None ,
436443 ):
437444 """|coro|
445+
438446 Fetches videos by id, game id, or user id
439447
440448 Parameters
@@ -478,6 +486,7 @@ async def fetch_videos(
478486 async def fetch_cheermotes (self , user_id : int = None ):
479487 """|coro|
480488
489+
481490 Fetches cheermotes from the twitch API
482491
483492 Parameters
@@ -494,6 +503,7 @@ async def fetch_cheermotes(self, user_id: int = None):
494503
495504 async def fetch_top_games (self ) -> List [models .Game ]:
496505 """|coro|
506+
497507 Fetches the top games from the api
498508
499509 Returns
@@ -505,6 +515,7 @@ async def fetch_top_games(self) -> List[models.Game]:
505515
506516 async def fetch_games (self , ids : List [int ] = None , names : List [str ] = None ) -> List [models .Game ]:
507517 """|coro|
518+
508519 Fetches games by id or name.
509520 At least one id or name must be provided
510521
@@ -524,6 +535,7 @@ async def fetch_games(self, ids: List[int] = None, names: List[str] = None) -> L
524535
525536 async def fetch_tags (self , ids : List [str ] = None ):
526537 """|coro|
538+
527539 Fetches stream tags.
528540
529541 Parameters
@@ -547,6 +559,7 @@ async def fetch_streams(
547559 token : str = None ,
548560 ):
549561 """|coro|
562+
550563 Fetches live streams from the helix API
551564
552565 Parameters
@@ -580,6 +593,7 @@ async def fetch_streams(
580593
581594 async def search_categories (self , query : str ):
582595 """|coro|
596+
583597 Searches twitches categories
584598
585599 Parameters
@@ -596,6 +610,7 @@ async def search_categories(self, query: str):
596610
597611 async def search_channels (self , query : str , * , live_only = False ):
598612 """|coro|
613+
599614 Searches channels for the given query
600615
601616 Parameters
@@ -614,6 +629,7 @@ async def search_channels(self, query: str, *, live_only=False):
614629
615630 async def delete_videos (self , token : str , ids : List [int ]) -> List [int ]:
616631 """|coro|
632+
617633 Delete videos from the api. Returns the video ids that were successfully deleted.
618634
619635 Parameters
@@ -635,6 +651,7 @@ async def delete_videos(self, token: str, ids: List[int]) -> List[int]:
635651
636652 async def get_webhook_subscriptions (self ):
637653 """|coro|
654+
638655 Fetches your current webhook subscriptions. Requires your bot to be logged in with an app access token.
639656
640657 Returns
@@ -647,6 +664,7 @@ async def get_webhook_subscriptions(self):
647664 async def event_token_expired (self ):
648665 """|coro|
649666
667+
650668 A special event called when the oauth token expires. This is a hook into the http system, it will call this
651669 when a call to the api fails due to a token expiry. This function should return either a new token, or `None`.
652670 Returning `None` will cause the client to attempt an automatic token generation.
@@ -660,6 +678,7 @@ async def event_token_expired(self):
660678 async def event_mode (self , channel : Channel , user : User , status : str ):
661679 """|coro|
662680
681+
663682 Event called when a MODE is received from Twitch.
664683
665684 Parameters
@@ -677,6 +696,7 @@ async def event_mode(self, channel: Channel, user: User, status: str):
677696 async def event_userstate (self , user : User ):
678697 """|coro|
679698
699+
680700 Event called when a USERSTATE is received from Twitch.
681701
682702 Parameters
@@ -689,6 +709,7 @@ async def event_userstate(self, user: User):
689709 async def event_raw_usernotice (self , channel : Channel , tags : dict ):
690710 """|coro|
691711
712+
692713 Event called when a USERNOTICE is received from Twitch.
693714 Since USERNOTICE's can be fairly complex and vary, the following sub-events are available:
694715
@@ -714,6 +735,7 @@ async def event_raw_usernotice(self, channel: Channel, tags: dict):
714735 async def event_usernotice_subscription (self , metadata ):
715736 """|coro|
716737
738+
717739 Event called when a USERNOTICE subscription or re-subscription event is received from Twitch.
718740
719741 Parameters
@@ -728,6 +750,7 @@ async def event_usernotice_subscription(self, metadata):
728750 async def event_part (self , user : User ):
729751 """|coro|
730752
753+
731754 Event called when a PART is received from Twitch.
732755
733756 Parameters
@@ -740,6 +763,7 @@ async def event_part(self, user: User):
740763 async def event_join (self , channel : Channel , user : User ):
741764 """|coro|
742765
766+
743767 Event called when a JOIN is received from Twitch.
744768
745769 Parameters
@@ -754,6 +778,7 @@ async def event_join(self, channel: Channel, user: User):
754778 async def event_message (self , message : Message ):
755779 """|coro|
756780
781+
757782 Event called when a PRIVMSG is received from Twitch.
758783
759784 Parameters
@@ -766,6 +791,7 @@ async def event_message(self, message: Message):
766791 async def event_error (self , error : Exception , data : str = None ):
767792 """|coro|
768793
794+
769795 Event called when an error occurs while processing data.
770796
771797 Parameters
@@ -788,6 +814,7 @@ async def event_error(error, data):
788814 async def event_ready (self ):
789815 """|coro|
790816
817+
791818 Event called when the Bot has logged in and is ready.
792819
793820 Example
@@ -803,6 +830,7 @@ async def event_ready():
803830 async def event_raw_data (self , data : str ):
804831 """|coro|
805832
833+
806834 Event called with the raw data received by Twitch.
807835
808836 Parameters
0 commit comments