Slash commands #257
theAbdoSabbagh
started this conversation in
General
Replies: 2 comments 11 replies
-
Slash commands are already present on the rebase branch. async for cmd in channel.slash_commands(query='h'):
if cmd.name == 'hi':
await cmd(param=value) |
Beta Was this translation helpful? Give feedback.
11 replies
-
You can’t pass integers or strings as parameters ?
… Le 6 sept. 2022 à 23:39, dolfies ***@***.***> a écrit :
Traceback (most recent call last): File "/Users/toto/opt/anaconda3/envs/test_slash/lib/python3.10/site-packages/discord/client.py", line 381, in _run_event await coro(*args, **kwargs) File "/Users/toto/Desktop/workspace/Python/perso/crypto/Meta Bot/main.old.py", line 68, in on_ready await command(user=titi) File "/Users/toto/opt/anaconda3/envs/test_slash/lib/python3.10/site-packages/discord/commands.py", line 486, in __call__ return await super().__call__(*self._parse_kwargs(kwargs), channel) File "/Users/toto/opt/anaconda3/envs/test_slash/lib/python3.10/site-packages/discord/commands.py", line 291, in _parse_kwargs v = str(v.id) AttributeError: 'int' object has no attribute 'id'
The issue here is that you're passing an ID instead of something that implements the Snowflake abstract base class (e.g. a User object, a Member object, an Object object).
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Slash commands will be enforced very soon. Is there any plans for them? Are selfbots going to be able to execute slash commands? Have this feature already be implemented in one of the branches such as rebase? If the slash commands got enforced before discord.py v2.0 was released, is there going to be any updates on this library to adapt to those breaking changes or are we gonna have to wait for the release of dpy 2.0 before any dpy-self updates?
Beta Was this translation helpful? Give feedback.
All reactions