#Issue in an activity command that seems unrelated to the code

1 messages · Page 1 of 1 (latest)

next garnet
#
class Activities(commands.Cog):
    def __init__(self, client):
        self.client = client

    @slash_command(name="activity", description="Start an activity in a voice channel")
    async def activity(self, ctx: discord.ApplicationContext, activity: Option(str,
                                                                               description="Activity you want to start",
                                                                               required=True,
                                                                               choices=["Youtube Together"]),
                       channel: discord.VoiceChannel):
        if activity:
            link = await channel.create_activity_invite(755600276941176913)
            await ctx.respond(f"{link.url}")

Error:

Ignoring exception in command activity:
Traceback (most recent call last):
File "/app/.heroku/python/lib/python3.10/site-packages/discord/commands/core.py", line 122, in wrapped
ret = await coro(arg)
File "/app/.heroku/python/lib/python3.10/site-packages/discord/commands/core.py", line 810, in _invoke
arg = obj_type(state=ctx.interaction._state, data=_data, **kw)
TypeError: 'tuple' object is not callable
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/app/.heroku/python/lib/python3.10/site-packages/discord/bot.py", line 1098, in invoke_application_command
await ctx.command.invoke(ctx)
File "/app/.heroku/python/lib/python3.10/site-packages/discord/commands/core.py", line 331, in invoke
await injected(ctx)
File "/app/.heroku/python/lib/python3.10/site-packages/discord/commands/core.py", line 128, in wrapped
raise ApplicationCommandInvokeError(exc) from exc
discord.errors.ApplicationCommandInvokeError: Application Command raised an exception: TypeError: 'tuple' object is not callable
#

All my other slash commands work fine

mortal sphinx
#

which version is installed?

next garnet
#

2.0.0b7

mortal sphinx
#

git or py-cord==2.0.0b7?

next garnet
#

the pypi release

mortal sphinx
#

you need the git version

next garnet
#

Huh really? Because this command worked fine in earlier versions

mortal sphinx
#

uninstall the py-cord==2.0.0b7 version

mortal sphinx
#

pip install git+https://github.com/Pycord-Development/pycord

next garnet
#

alright

next garnet
#

alright it worked