Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jsk sync command broken on dpy master #233

Open
4 tasks done
Ken-Miles opened this issue May 11, 2024 · 6 comments
Open
4 tasks done

jsk sync command broken on dpy master #233

Ken-Miles opened this issue May 11, 2024 · 6 comments

Comments

@Ken-Miles
Copy link

Summary

The sync command is broken when using the master version of discord.py (and soon discord.py 2.4).

Reproduction steps

Use the master branch of discord.py:
discord.py @ git+https://github.com/Rapptz/discord.py@08b138cc71fea5594c068082ee565a05cde2c7fa

Attempt to sync

Expected results

The syncing of my command tree

Actual results

The sync command errors, giving the following traceback:

Ignoring exception in command jishaku sync:
Traceback (most recent call last):
  File "/home/me/bot/.venv/lib/python3.11/site-packages/discord/ext/commands/core.py", line 235, in wrapped
    ret = await coro(*args, **kwargs)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/j/bot/.venv/lib/python3.11/site-packages/jishaku/features/management.py", line 242, in jsk_sync
    payload = [command.to_dict() for command in slash_commands]
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/j/bot/.venv/lib/python3.11/site-packages/jishaku/features/management.py", line 242, in <listcomp>
    payload = [command.to_dict() for command in slash_commands]
               ^^^^^^^^^^^^^^^^^
TypeError: Command.to_dict() missing 1 required positional argument: 'tree'

Checklist

  • I have updated discord.py and jishaku to the latest available versions and have confirmed that this issue is still present
  • I have searched the open issues for duplicates
  • I have shown the entire traceback, if possible
  • I have removed my token from display, if visible

System information

JSK 2.5.2
discord.py @ git+https://github.com/Rapptz/discord.py@08b138cc71fea5594c068082ee565a05cde2c7fa

@Ken-Miles
Copy link
Author

Right after posting this, I found a PR that supposedly fixes this: #230

@munishkhatri720
Copy link

Same issue here

Traceback (most recent call last):
  File "C:\Users\Administrator\Documents\Hade Manager\venv\Lib\site-packages\discord\ext\commands\core.py", line 235, in wrapped
    ret = await coro(*args, **kwargs)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\Documents\Hade Manager\venv\Lib\site-packages\jishaku\features\management.py", line 242, in jsk_sync
    payload = [command.to_dict() for command in slash_commands]
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\Documents\Hade Manager\venv\Lib\site-packages\jishaku\features\management.py", line 242, in <listcomp>
    payload = [command.to_dict() for command in slash_commands]
               ^^^^^^^^^^^^^^^^^
TypeError: Group.to_dict() missing 1 required positional argument: 'tree'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\Users\Administrator\Documents\Hade Manager\venv\Lib\site-packages\jishaku\features\invocation.py", line 168, in jsk_debug
    await alt_ctx.command.invoke(alt_ctx)
  File "C:\Users\Administrator\Documents\Hade Manager\venv\Lib\site-packages\discord\ext\commands\core.py", line 1650, in invoke
    await ctx.invoked_subcommand.invoke(ctx)
  File "C:\Users\Administrator\Documents\Hade Manager\venv\Lib\site-packages\discord\ext\commands\core.py", line 1029, in invoke
    await injected(*ctx.args, **ctx.kwargs)  # type: ignore
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\Documents\Hade Manager\venv\Lib\site-packages\discord\ext\commands\core.py", line 244, in wrapped
    raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: TypeError: Group.to_dict() missing 1 required positional argument: 'tree'

@bitterteriyaki
Copy link

Any updates on this?

@Ken-Miles
Copy link
Author

Still experiencing this issue even with 2.4. Had to make my own sync command until the PR is merged.

@Gorialis
Copy link
Owner

#235 should have fixed this. Try installing a development version and see if it fixes it.

@bitterteriyaki
Copy link

#235 should have fixed this. Try installing a development version and see if it fixes it.

Oops, I didn't see that this was fixed on master branch. Everything is working now. When will be there a new release?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants