Skip to content

Commit 669dff1

Browse files
committed
localise Bot inherited member docs
1 parent 3b20793 commit 669dff1

File tree

1 file changed

+35
-35
lines changed

1 file changed

+35
-35
lines changed

twitchio/client.py

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@ class Client:
7979
:class:`commands.Bot` inherits from this class and such should be treated as a `Client` with an in-built
8080
commands extension.
8181
82-
You don't need to :meth:`~Client.start` or :meth:`~Client.run` the `Client` to use it soley as a HTTP Wrapper,
83-
but you must still :meth:`~Client.login` with this use case.
82+
You don't need to :meth:`~.start` or :meth:`~.run` the `Client` to use it soley as a HTTP Wrapper,
83+
but you must still :meth:`~.login` with this use case.
8484
8585
Parameters
8686
-----------
@@ -159,15 +159,15 @@ def tokens(self) -> MappingProxyType[str, TokenMappingData]:
159159
160160
**For various methods of managing the tokens on the client, see:**
161161
162-
:meth:`~Client.add_token`
162+
:meth:`~.add_token`
163163
164-
:meth:`~Client.remove_token`
164+
:meth:`~.remove_token`
165165
166-
:meth:`~Client.load_tokens`
166+
:meth:`~.load_tokens`
167167
168-
:meth:`~Client.dump_tokens`
168+
:meth:`~.dump_tokens`
169169
170-
:meth:`~Client.add_token`
170+
:meth:`~.add_token`
171171
172172
173173
.. warning::
@@ -237,10 +237,10 @@ def dispatch(self, event: str, payload: Any | None = None) -> None:
237237

238238
async def setup_hook(self) -> None:
239239
"""
240-
Method called after :meth:`~Client.login` has been called but before the client is ready.
240+
Method called after :meth:`~.login` has been called but before the client is ready.
241241
242-
:meth:`~Client.start` calls :meth:`~Client.login` internally for you, so when using
243-
:meth:`~Client.start` this method will be called after the client has generated and validated an
242+
:meth:`~.start` calls :meth:`~.login` internally for you, so when using
243+
:meth:`~.start` this method will be called after the client has generated and validated an
244244
app token. The client won't complete start up until this method has completed.
245245
246246
This method is intended to be overriden to provide an async environment for any setup required.
@@ -252,10 +252,10 @@ async def setup_hook(self) -> None:
252252
async def login(self, *, token: str | None = None) -> None:
253253
"""Method to login the client and generate or store an app token.
254254
255-
This method is called automatically when using :meth:`~Client.start`.
256-
You should **NOT** call this method if you are using :meth:`~Client.start`.
255+
This method is called automatically when using :meth:`~.start`.
256+
You should **NOT** call this method if you are using :meth:`~.start`.
257257
258-
This method calls :meth:`~Client.setup_hook`.
258+
This method calls :meth:`~.setup_hook`.
259259
260260
.. note::
261261
@@ -296,7 +296,7 @@ async def start(self, token: str | None = None, *, with_adapter: bool = True) ->
296296
297297
Method to login and run the `Client` asynchronously on an already running event loop.
298298
299-
You should not call :meth:`~Client.login` if you are using this method as it is called internally
299+
You should not call :meth:`~.login` if you are using this method as it is called internally
300300
for you.
301301
302302
.. note::
@@ -343,15 +343,15 @@ async def main() -> None:
343343
def run(self, token: str | None = None, *, with_adapter: bool = True) -> None:
344344
"""Method to login the client and create a continuously running event loop.
345345
346-
The behaviour of this method is similar to :meth:`~Client.start` but instead of being used in an already running
346+
The behaviour of this method is similar to :meth:`~.start` but instead of being used in an already running
347347
async environment, this method will setup and create an async environment for you.
348348
349-
You should not call :meth:`~Client.login` if you are using this method as it is called internally
349+
You should not call :meth:`~.login` if you are using this method as it is called internally
350350
for you.
351351
352352
.. important::
353353
354-
You can not use this method in an already running async event loop. See: :meth:`~Client.start` for starting the
354+
You can not use this method in an already running async event loop. See: :meth:`~.start` for starting the
355355
client in already running async environments.
356356
357357
.. note::
@@ -387,7 +387,7 @@ async def run() -> None:
387387
async def close(self) -> None:
388388
"""Method which closes the :class:`~Client` gracefully.
389389
390-
This method is called for you automatically when using :meth:`~Client.run` or when using the client with the
390+
This method is called for you automatically when using :meth:`~.run` or when using the client with the
391391
async context-manager, E.g: `async with client:`
392392
393393
You can override this method to implement your own clean-up logic, however you should call `await super().close()`
@@ -559,8 +559,8 @@ async def load_tokens(self, path: str | None = None, /) -> None:
559559
560560
.. note::
561561
562-
This method is always called by the client during :meth:`~Client.login` but **before**
563-
:meth:`~Client.setup_hook`.
562+
This method is always called by the client during :meth:`~.login` but **before**
563+
:meth:`~.setup_hook`.
564564
565565
You can override this method to implement your own token loading logic into the client, such as from a database.
566566
@@ -607,7 +607,7 @@ async def dump_tokens(self, path: str | None = None, /) -> None:
607607
By default this method dumps to a JSON file named `".tio.tokens.json"`.
608608
609609
You can override this method to implement your own custom logic, such as saving tokens to a database, however
610-
it is preferred to use :meth:`~Client.add_token` to ensure the tokens are handled as they are added.
610+
it is preferred to use :meth:`~.add_token` to ensure the tokens are handled as they are added.
611611
612612
Parameters
613613
----------
@@ -972,7 +972,7 @@ async def fetch_extensions(self, *, token_for: str | PartialUser) -> list[Extens
972972
The User ID, or PartialUser, that will be used to find an appropriate managed user token for this request.
973973
The token must inlcude the `user:read:broadcast` or `user:edit:broadcast` scope.
974974
975-
See: :meth:`~Client.add_token` to add managed tokens to the client.
975+
See: :meth:`~.add_token` to add managed tokens to the client.
976976
To include inactive extensions, you must include the `user:edit:broadcast` scope.
977977
978978
Returns
@@ -1003,15 +1003,15 @@ async def update_extensions(
10031003
.. note::
10041004
10051005
Requires a user access token that includes the `user:edit:broadcast` scope.
1006-
See: :meth:`~Client.add_token` to add managed tokens to the client.
1006+
See: :meth:`~.add_token` to add managed tokens to the client.
10071007
10081008
Parameters
10091009
----------
10101010
token_for: str | PartialUser
10111011
The User ID, or PartialUser, that will be used to find an appropriate managed user token for this request.
10121012
The token must inlcude the `user:edit:broadcast` scope.
10131013
1014-
See: :meth:`~Client.add_token` to add managed tokens to the client.
1014+
See: :meth:`~.add_token` to add managed tokens to the client.
10151015
10161016
Returns
10171017
-------
@@ -1240,9 +1240,9 @@ async def fetch_game(
12401240
12411241
.. note::
12421242
1243-
See: :meth:`~Client.fetch_games` to fetch multiple games at once.
1243+
See: :meth:`~.fetch_games` to fetch multiple games at once.
12441244
1245-
See: :meth:`~Client.fetch_top_games` to fetch the top games currently being streamed.
1245+
See: :meth:`~.fetch_top_games` to fetch the top games currently being streamed.
12461246
12471247
Parameters
12481248
----------
@@ -1590,7 +1590,7 @@ async def delete_videos(self, *, ids: list[str | int], token_for: str | PartialU
15901590
The User ID, or PartialUser, that will be used to find an appropriate managed user token for this request.
15911591
The token must inlcude the `channel:manage:videos` scope.
15921592
1593-
See: :meth:`~Client.add_token` to add managed tokens to the client.
1593+
See: :meth:`~.add_token` to add managed tokens to the client.
15941594
15951595
Returns
15961596
-------
@@ -1638,7 +1638,7 @@ def fetch_stream_markers(
16381638
The User ID, or PartialUser, that will be used to find an appropriate managed user token for this request.
16391639
The token must inlcude the `user:read:broadcast` *or* `channel:manage:broadcast` scope
16401640
1641-
See: :meth:`~Client.add_token` to add managed tokens to the client.
1641+
See: :meth:`~.add_token` to add managed tokens to the client.
16421642
first: int
16431643
The maximum number of items to return per page. Defaults to **20**.
16441644
The maximum number of items per page is **100**.
@@ -1711,7 +1711,7 @@ def fetch_drop_entitlements(
17111711
An optional User-ID that will be used to find an appropriate managed user token for this request.
17121712
The Client-ID associated with the token must own the game.
17131713
1714-
See: :meth:`~Client.add_token` to add managed tokens to the client.
1714+
See: :meth:`~.add_token` to add managed tokens to the client.
17151715
If this paramter is not provided or `None`, the default app token is used.
17161716
ids: list[str] | None
17171717
A list of entitlement ids that identifies the entitlements to fetch.
@@ -1787,7 +1787,7 @@ async def update_entitlements(
17871787
An optional User ID that will be used to find an appropriate managed user token for this request.
17881788
The Client-ID associated with the token must own the game associated with this drop entitlment.
17891789
1790-
See: :meth:`~Client.add_token` to add managed tokens to the client.
1790+
See: :meth:`~.add_token` to add managed tokens to the client.
17911791
If this paramter is not provided or `None`, the default app token is used.
17921792
17931793
Returns
@@ -1860,9 +1860,9 @@ async def subscribe_websocket(
18601860
An optional User-ID that will be used to find an appropriate managed user token for this request.
18611861
18621862
If `as_bot` is `True`, this is always the token associated with the
1863-
:attr:`~Client.bot_id` account. Defaults to `None`.
1863+
:attr:`~.bot_id` account. Defaults to `None`.
18641864
1865-
See: :meth:`~Client.add_token` to add managed tokens to the client.
1865+
See: :meth:`~.add_token` to add managed tokens to the client.
18661866
If this paramter is not provided or `None`, the default app token is used.
18671867
socket_id: str | None
18681868
An optional `str` corresponding to an exisiting and connected websocket session, to use for this subscription.
@@ -1976,7 +1976,7 @@ async def subscribe_webhook(
19761976
Usually you wouldn't use webhooks to subscribe to the
19771977
:class:`~twitchio.eventsub.ChatMessageSubscription` subscription.
19781978
1979-
Consider using :meth:`~Client.subscribe_websocket` for this subscription.
1979+
Consider using :meth:`~.subscribe_websocket` for this subscription.
19801980
19811981
Parameters
19821982
----------
@@ -1991,9 +1991,9 @@ async def subscribe_webhook(
19911991
An optional User-ID that will be used to find an appropriate managed user token for this request.
19921992
19931993
If `as_bot` is `True`, this is always the token associated with the
1994-
:attr:`~Client.bot_id` account. Defaults to `None`.
1994+
:attr:`~.bot_id` account. Defaults to `None`.
19951995
1996-
See: :meth:`~Client.add_token` to add managed tokens to the client.
1996+
See: :meth:`~.add_token` to add managed tokens to the client.
19971997
If this paramter is not provided or `None`, the default app token is used.
19981998
callback_url: str | None
19991999
An optional url to use as the webhook `callback_url` for this subscription. If you are using one of the built-in

0 commit comments

Comments
 (0)