Skip to content
This repository was archived by the owner on Jul 12, 2024. It is now read-only.
This repository was archived by the owner on Jul 12, 2024. It is now read-only.

Module fails to work when it receives an interaction #2

@Seniru

Description

@Seniru

I tried using your library since it looked much simpler than most of the other implementation. But there was this problem when the gateway received a slash interaction.

future: <Task finished name='Task-1' coro=<Client.start() done, defined at /workspace/.pip-modules/lib/python3.8/site-packages/discord/client.py:649> exception=TypeError("'guild_id' is an invalid keyword argument for int()")>
Traceback (most recent call last):
  File "/workspace/.pip-modules/lib/python3.8/site-packages/discord/client.py", line 666, in start
    await self.connect(reconnect=reconnect)
  File "/workspace/.pip-modules/lib/python3.8/site-packages/discord/client.py", line 566, in connect
    await self.ws.poll_event()
  File "/workspace/.pip-modules/lib/python3.8/site-packages/discord/gateway.py", line 559, in poll_event
    await self.received_message(msg.data)
  File "/workspace/.pip-modules/lib/python3.8/site-packages/discord/gateway.py", line 509, in received_message
    func(data)
  File "/workspace/.pip-modules/lib/python3.8/site-packages/discordslashcommands/manager.py", line 139, in _function_runner
    interaction = Interaction(client=self._client, version=data["version"], type=data["type"], token=data["token"], id=data["id"], guild=guild, channel_id=data["channel_id"], data=data["data"], member_data=data["member"])
  File "/workspace/.pip-modules/lib/python3.8/site-packages/discordslashcommands/interactions.py", line 33, in __init__
    self.command = Command(name=data["name"], description=None, client=client, id=int(data["id"], guild_id=guild.id))
TypeError: 'guild_id' is an invalid keyword argument for int()

Looks like you forgot to add a ) after data["id"] :P

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions