Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom Command Examples Broken #6138

Closed
Crocatowa opened this issue May 9, 2023 · 0 comments · Fixed by #6149
Closed

Custom Command Examples Broken #6138

Crocatowa opened this issue May 9, 2023 · 0 comments · Fixed by #6149
Labels
Category: Cogs - CustomCommands This is related to the CustomCommands cog. Status: In Progress There's a PR open to deal with this, or an org member is working on this internally Type: Bug Unexpected behavior, result, or exception. In case of PRs, it is a fix for the foregoing.

Comments

@Crocatowa
Copy link

Crocatowa commented May 9, 2023

What Red version are you using?

3.5.1

Cog name

Customcom

Command name

!say Pete and Repeat

What did you expect to happen?

Bot should echo "Pete and Repeat"

[p]customcom add simple say {0}
[p]say Pete and Repeat
(In my case, !customcom.... etc)

What actually happened?

Nothing on the Discord side, this error in the logs:

[ERROR] discord.client: Ignoring exception in on_message_without_command
Traceback (most recent call last):
  File "/data/venv/lib/python3.11/site-packages/discord/client.py", line 441, in _run_event
    await coro(*args, **kwargs)
  File "/data/venv/lib/python3.11/site-packages/redbot/cogs/customcom/customcom.py", line 679, in on_message_without_command
    await self.bot.invoke(ctx)
  File "/data/venv/lib/python3.11/site-packages/discord/ext/commands/bot.py", line 1350, in invoke
    await ctx.command.invoke(ctx)
  File "/data/venv/lib/python3.11/site-packages/discord/ext/commands/core.py", line 1015, in invoke
    await self.prepare(ctx)
  File "/data/venv/lib/python3.11/site-packages/redbot/core/commands/commands.py", line 482, in prepare
    await self._parse_arguments(ctx)
  File "/data/venv/lib/python3.11/site-packages/discord/ext/commands/core.py", line 847, in _parse_arguments
    kwargs[name] = await self.transform(ctx, param, attachments)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/venv/lib/python3.11/site-packages/discord/ext/commands/core.py", line 647, in transform
    converter = param.converter
                ^^^^^^^^^^^^^^^
AttributeError: 'Parameter' object has no attribute 'converter'

How can we reproduce this error?

  1. Fresh Install of Red 3.5.1 with Python 3.11
  2. !customcom add simple say {0}
  3. !say Pete and Repeat
  4. Bot doesn't respond in Discord and Error is posted to the logs

Anything else?

I was following the examples in https://docs.discord.red/en/stable/cog_customcom.html
The only example that did work was the one for the avatar image

@Crocatowa Crocatowa added the Type: Bug Unexpected behavior, result, or exception. In case of PRs, it is a fix for the foregoing. label May 9, 2023
@github-actions github-actions bot added the Status: Needs Triage This has not been labeled or discussed for handling yet. label May 9, 2023
@Jackenmen Jackenmen added this to the 3.5.2 milestone May 11, 2023
@Jackenmen Jackenmen added Status: Accepted We want this Status: PRs Welcome No one is currently assigned to this issue, but we'd be grateful if anyone made a PR. Category: Cogs - CustomCommands This is related to the CustomCommands cog. and removed Status: Needs Triage This has not been labeled or discussed for handling yet. labels May 11, 2023
@Jackenmen Jackenmen removed this from the 3.5.2 milestone May 12, 2023
@Jackenmen Jackenmen added Status: In Progress There's a PR open to deal with this, or an org member is working on this internally and removed Status: Accepted We want this Status: PRs Welcome No one is currently assigned to this issue, but we'd be grateful if anyone made a PR. labels May 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Cogs - CustomCommands This is related to the CustomCommands cog. Status: In Progress There's a PR open to deal with this, or an org member is working on this internally Type: Bug Unexpected behavior, result, or exception. In case of PRs, it is a fix for the foregoing.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants