dolfies / discord.py-self

A fork of the popular discord.py for user accounts.
https://discordpy-self.rtfd.io/en/latest/
MIT License
665 stars 155 forks source link

Modal Submit Not Implemented Error #495

Closed JamesTesting888 closed 1 year ago

JamesTesting888 commented 1 year ago

Summary

Tried using modal.submit for a slash command.

Reproduction Steps

  1. Run a slash command
  2. Using bot.wait_for() to get the modal popped up using the event on_modal
  3. Submit the modal
async for cmd in channel.slash_commands(query='post'):
    if cmd.name == 'post':
        await cmd()

        def check(m):
            return m.title == "Need clanmates post"

        modal = await bot.wait_for("modal", check=check)
        await modal.submit()

Code

No response

Expected Results

Modal submitted.

Actual Results

Task exception was never retrieved future: <Task finished name='Task-14' coro=<post_23h_task() done, defined at /Users/PycharmProjects/James Projects/Bots Stuff/Discord Bot/Post Bot/main.py:88> exception=NotImplementedError()> Traceback (most recent call last): File "/Users/PycharmProjects/James Projects/Bots Stuff/Discord Bot/Post Bot/main.py", line 129, in post_23h_task await modal.submit() File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/discord/modal.py", line 136, in submit self.to_dict(), File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/discord/modal.py", line 104, in to_dict 'components': [c.to_dict() for c in self.components], File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/discord/modal.py", line 104, in 'components': [c.to_dict() for c in self.components], File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/discord/components.py", line 102, in to_dict raise NotImplementedError NotImplementedError

System Information

discord.py-self==2.0.0 python3.9

Checklist

Additional Information

No response

dolfies commented 1 year ago

Should be fixed! Sorry for the delay.