Command invoke fails in a forum post thread
Closed this issue · 0 comments
6days9weeks commented
Summary
Command check fails when a command is ran in a forum thread.
Reproduction Steps
Make a command with checks and run it in a forum post thread
Minimal Reproducible Code
@commands.command(application_command_meta=commands.ApplicationCommandMeta())
@commands.cooldown(1, 3, commands.BucketType.user)
@commands.has_permissions(embed_links=True)
async def ping(self, ctx: commands.Context):
"""Pong."""
latency = self.bot.latency * 1000
await ctx.send(embed=discord.Embed(description=latency, title="Ping!"))
Expected Results
Command to run normally.
Actual Results
Traceback (most recent call last):
File "/home/uwu/.cache/pypoetry/virtualenvs/siesta-kBe330Dw-py3.9/lib/python3.9/site-packages/jishaku/features/invocation.py", line 146, in jsk_debug
await alt_ctx.command.invoke(alt_ctx)
File "/home/uwu/.cache/pypoetry/virtualenvs/siesta-kBe330Dw-py3.9/lib/python3.9/site-packages/discord/ext/commands/core.py", line 1063, in invoke
await self.prepare(ctx)
File "/home/uwu/.cache/pypoetry/virtualenvs/siesta-kBe330Dw-py3.9/lib/python3.9/site-packages/discord/ext/commands/core.py", line 1005, in prepare
return await self._prepare_text(ctx)
File "/home/uwu/.cache/pypoetry/virtualenvs/siesta-kBe330Dw-py3.9/lib/python3.9/site-packages/discord/ext/commands/core.py", line 913, in _prepare_text
if not await self.can_run(ctx):
File "/home/uwu/.cache/pypoetry/virtualenvs/siesta-kBe330Dw-py3.9/lib/python3.9/site-packages/discord/ext/commands/core.py", line 1321, in can_run
return await discord.utils.async_all(predicate(ctx) for predicate in predicates) # type: ignore
File "/home/uwu/.cache/pypoetry/virtualenvs/siesta-kBe330Dw-py3.9/lib/python3.9/site-packages/discord/utils.py", line 522, in async_all
for elem in gen:
File "/home/uwu/.cache/pypoetry/virtualenvs/siesta-kBe330Dw-py3.9/lib/python3.9/site-packages/discord/ext/commands/core.py", line 1321, in <genexpr>
return await discord.utils.async_all(predicate(ctx) for predicate in predicates) # type: ignore
File "/home/uwu/.cache/pypoetry/virtualenvs/siesta-kBe330Dw-py3.9/lib/python3.9/site-packages/discord/ext/commands/core.py", line 2413, in predicate
permissions = ch.permissions_for(ctx.author) # type: ignore
discord.errors.ClientException: Parent channel not found
Intents
all
System Information
latest master revision
Checklist
- 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.
Additional Context
No response