From 0c6f59b9a7dadeaace6c30ae98201ce64a31b0d1 Mon Sep 17 00:00:00 2001 From: EdVraz <88881326+EdVraz@users.noreply.github.com> Date: Tue, 23 Aug 2022 18:49:14 +0200 Subject: [PATCH 1/3] docs: update FAQ and quickstart documentation links (#1038) * Docs: add back previous changes * docs: fix outdated links in the quickstart (#1037) Co-authored-by: Damego --- docs/faq.rst | 14 ++++++++------ docs/quickstart.rst | 4 ++-- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/docs/faq.rst b/docs/faq.rst index bb572d212..789b56a66 100644 --- a/docs/faq.rst +++ b/docs/faq.rst @@ -154,21 +154,22 @@ A list of all official extensions can be found `on our github page`_ Those are (at the moment): -- A `voice client`_ - which is still WIP, but it is able to listen for the ``VOICE_STATE_UPDATE`` event. -- An `autosharder`_ for automatic sharding +- `voice client`_ - which is still WIP, but it is able to listen for the ``VOICE_STATE_UPDATE`` event. +- `autosharder`_ for automatic sharding - `wait_for`_ allows listening and waiting for a specific event or a component inside a function - `files`_ for file sending with ctx - `Molter`_ for message commands - `enhanced`_ which enhances the DX in general -- A `paginator`_ for paginating embeds on messages using components -- `persistence`_ - for storing data inside your custom IDs (as an alternative to ``wait_for``) +- `paginator`_ for paginating embeds on messages using components +- `persistence`_ for storing data inside your custom IDs (as an alternative to ``wait_for``) +- `lavalink`_ for voice sending and listening ``VOICE_STATE_UPDATE`` event +- `fastapi`_ for building own API - And a `boilerplate`_ Below are a few unofficial exts (for the time being) which implement some functionality similar to what d.py had: - `checks and cooldowns`_ - `tasks`_ -- `get`_ for getting objects from the discord API (will be implemented into the core library at a later time) Usage examples can usually be found at the linked page @@ -318,4 +319,5 @@ Please join our `Discord Server`_ for any further support regarding our library .. _persistence: https://github.com/interactions-py/persistence .. _Molter: https://github.com/interactions-py/molter .. _boilerplate: https://github.com/interactions-py/boilerplate -.. _get: https://github.com/EdVraz/interactions-get +.. _lavalink: https://github.com/interactions-py/interactions-lavalink +.. _fastapi: https://github.com/interactions-py/interactions-fastapi diff --git a/docs/quickstart.rst b/docs/quickstart.rst index 240700507..5756fa74b 100644 --- a/docs/quickstart.rst +++ b/docs/quickstart.rst @@ -686,6 +686,6 @@ Usage of ``@autodefer()``: await asyncio.sleep(5) await ctx.send("I'm awake now!") -.. _Client: https://interactionspy.rtfd.io/en/stable/client.html -.. _find these component types: https://interactionspy.readthedocs.io/en/stable/models.component.html +.. _Client: https://interactionspy.rtfd.io/en/latest/client.html +.. _find these component types: https://interactionspy.readthedocs.io/en/latest/models.component.html .. _discord applications page: https://discord.com/developers/applications From b71d4a29a0998549209c6c1fd8ecb861acd6f106 Mon Sep 17 00:00:00 2001 From: jplight Date: Sat, 3 Sep 2022 13:38:34 +0200 Subject: [PATCH 2/3] fix forcing http add force_arg which takes the pop argument to checking it twice. --- interactions/utils/get.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/interactions/utils/get.py b/interactions/utils/get.py index 562651950..ffb0b3150 100644 --- a/interactions/utils/get.py +++ b/interactions/utils/get.py @@ -194,8 +194,9 @@ def _check(): _objects: List[Union[_obj, Coroutine]] = [] kwarg_name += "s" - force_cache = kwargs.pop("force", None) == "cache" - force_http = kwargs.pop("force", None) == "http" + force_arg = kwargs.pop("force", None) + force_cache = force_arg == "cache" + force_http = force_arg == "http" if not force_http: _objects = _get_cache(_obj, client, kwarg_name, _list=True, **kwargs) @@ -230,8 +231,10 @@ def _check(): _obj: Optional[_T] = None - force_cache = kwargs.pop("force", None) == "cache" - force_http = kwargs.pop("force", None) == "http" + force_arg = kwargs.pop("force", None) + force_cache = force_arg == "cache" + force_http = force_arg == "http" + if not force_http: _obj = _get_cache(obj, client, kwarg_name, **kwargs) From 635133f0b33f5733a8750e775411b203a48c1a68 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sat, 3 Sep 2022 11:49:36 +0000 Subject: [PATCH 3/3] ci: correct from checks. --- interactions/utils/get.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interactions/utils/get.py b/interactions/utils/get.py index ffb0b3150..2616e95ba 100644 --- a/interactions/utils/get.py +++ b/interactions/utils/get.py @@ -234,7 +234,7 @@ def _check(): force_arg = kwargs.pop("force", None) force_cache = force_arg == "cache" force_http = force_arg == "http" - + if not force_http: _obj = _get_cache(obj, client, kwarg_name, **kwargs)