You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when removeing the _ in discord/cog.py the error gos away
CUbot is a subclass of commands
`Traceback (most recent call last):
File "/home/pooh/.local/share/virtualenvs/refractor-9meiG1iJ/lib/python3.10/site-packages/discord/cog.py", line 786, in _load_from_module_spec
setup(self)
File "/mnt/sharessd/code/python/utachi/refractor/bot/extendtions/music/main.py", line 536, in setup
client.add_cog(Music(client))
File "/home/pooh/.local/share/virtualenvs/refractor-9meiG1iJ/lib/python3.10/site-packages/discord/cog.py", line 656, in add_cog
cog = cog._inject(self)
File "/home/pooh/.local/share/virtualenvs/refractor-9meiG1iJ/lib/python3.10/site-packages/discord/cog.py", line 545, in _inject
bot._bridge_commands.append(command)
AttributeError: 'CUbot' object has no attribute '_bridge_commands'. Did you mean: 'bridge_commands'?
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/lib64/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib64/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/mnt/sharessd/code/python/utachi/refractor/bot/main.py", line 115, in
run()
File "/mnt/sharessd/code/python/utachi/refractor/bot/main.py", line 101, in run
client.load_extension(name='bot.extendtions.music.main')
File "/home/pooh/.local/share/virtualenvs/refractor-9meiG1iJ/lib/python3.10/site-packages/discord/cog.py", line 910, in load_extension
self._load_from_module_spec(spec, name)
File "/home/pooh/.local/share/virtualenvs/refractor-9meiG1iJ/lib/python3.10/site-packages/discord/cog.py", line 791, in _load_from_module_spec
raise errors.ExtensionFailed(key, e) from e
discord.errors.ExtensionFailed: Extension 'bot.extendtions.music.main' raised an error: AttributeError: 'CUbot' object has no attribute '_bridge_commands'`
Summary
@bot.bridge_command() inside of a cog causes a crash.
Reproduction Steps
Minimal Reproducible Code
Expected Results
The cog will be added, and the bot will start as in 2.3.0.
Actual Results
The bot crashes with an error and will not start.
Intents
All
System Information
Checklist
Additional Context
Works fine in 2.3.0. Tested on both Python 3.10 and 3.11, same results.
May be related to #1800.
The text was updated successfully, but these errors were encountered: