Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions docs/faq.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
4 changes: 2 additions & 2 deletions docs/quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
11 changes: 7 additions & 4 deletions interactions/utils/get.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)

Expand Down