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