Custom Command Examples Broken #6138

Closed
opened 2023-05-09 16:00:01 +02:00 by Crocatowa · 0 comments
Crocatowa commented 2023-05-09 16:00:01 +02:00 (Migrated from github.com)

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

### 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
Sign in to join this conversation.
No labels
Automated PR
Blocked
Blocked By: Damage Control
Blocked By: Dependency
Blocked By: Other PR
Breaking Change
Category: CI
Category: Cogs - Admin
Category: Cogs - Alias
Category: Cogs - Audio
Category: Cogs - Bank
Category: Cogs - Cleanup
Category: Cogs - CustomCommands
Category: Cogs - Dev
Category: Cogs - Downloader
Category: Cogs - Economy
Category: Cogs - Filter
Category: Cogs - General
Category: Cogs - Image
Category: Cogs - Mod
Category: Cogs - Modlog
Category: Cogs - Mutes
Category: Cogs - Permissions
Category: Cogs - Reports
Category: Cogs - Streams
Category: Cogs - Trivia
Category: Cogs - Trivia - Lists
Category: Cogs - Warnings
Category: Core - API - App Commands Package
Category: Core - API - Audio
Category: Core - API - Bank
Category: Core - API - Commands Package
Category: Core - API - Config
Category: Core - API - Other
Category: Core - API - Utils Package
Category: Core - Bot Class
Category: Core - Bot Commands
Category: Core - Command-line Interfaces
Category: Core - Downloader
Category: Core - Help
Category: Core - i18n
Category: Core - Modlog
Category: Core - Other Internals
Category: Core - RPC/ZMQ
Category: Docker
Category: Docs - Changelogs
Category: Docs - For Developers
Category: Docs - Install Guides
Category: Docs - Other
Category: Docs - User Guides
Category: Meta
Category: RPC/ZMQ methods
Category: Vendored Packages
Changelog Entry: Added
Changelog Entry: Pending
Changelog Entry: Skipped
Closed: Duplicate
Closed: External
Closed: Invalid
Closed: User Error
Closed: Won't Fix
Complex Issue
Docs-only
Feature Branch
Good First Issue
Help Wanted
High Priority
Needs Backport To stable-docs
No Activity
No Repro
QA: Bypassed
QA: Changes Requested
QA: Passed
Release Blocker
Status: Accepted
Status: Frozen
Status: In Progress
Status: Needs Discussion
Status: Needs Info
Status: Needs Triage
Status: PRs Welcome
Type: Bug
Type: Dependency Update
Type: Deprecation
Type: Enhancement
Type: Feature
Type: Informational
Type: Merge
Type: Optimisation
Type: Question
Type: Removal
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Mrcoolgamer11/Red-DiscordBot#6138
No description provided.