Implement a least breaking approach to slash commands #39

Merged
Gnome-py merged 42 commits from 2.0 into 2.0 2021-09-18 23:28:11 +00:00
Showing only changes of commit bad92723fc - Show all commits

View File

@@ -61,6 +61,13 @@ the name to something other than the function would be as simple as doing this:
async def _list(ctx, arg):
pass
Slash Commands
--------------
Slash Commands can be enabled in the :class:`.Bot` constructor or :class:`.Command` constructor, using
``slash_commands=True`` or ``slash_command=True`` respectfully. All features of the commands extension
should work with these options enabled, however many will not have direct discord counterparts and therefore
will be subsituted for supported versions when uploaded to discord.
Parameters
------------
@@ -179,6 +186,11 @@ know how the command was executed. It contains a lot of useful information:
The context implements the :class:`abc.Messageable` interface, so anything you can do on a :class:`abc.Messageable` you
can do on the :class:`~ext.commands.Context`.
.. warning::
:attr:`.Context.message` will be fake if in a slash command, it is not recommended to use this attribute
if :attr:`.Context.interaction` is not None. Currently this will emit a warning and fail silently, however
this behaviour may be changed in the future.
Converters
------------