AAA3A-AAA3A / AAA3A-cogs

Many cogs for Red-DiscordBot.
https://aaa3a-cogs.readthedocs.io/en/latest
Other
35 stars 28 forks source link

[EditTextChannel] The cog is failing to load after the update! #20

Closed cool-aid-man closed 2 years ago

cool-aid-man commented 2 years ago

What cog is this bug report for?

edittextchannel

Describe the bug

Hi, AAA3A After updating the edittextchannel, it fails to load up and throwing the mentioned error when I try to .load it back. Used to work perfectly fine before yesterday. Thanks

(The error is attached)

If there's an error, paste it here

Exception during loading of package
Traceback (most recent call last):
  File "/home/ubuntu/redenv/lib/python3.9/site-packages/redbot/core/core_commands.py", line 172, in _load
    await bot.load_extension(spec)
  File "/home/ubuntu/redenv/lib/python3.9/site-packages/redbot/core/bot.py", line 1554, in load_extension
    lib = spec.loader.load_module()
  File "<frozen importlib._bootstrap_external>", line 529, in _check_name_wrapper
  File "<frozen importlib._bootstrap_external>", line 1034, in load_module
  File "<frozen importlib._bootstrap_external>", line 859, in load_module
  File "<frozen importlib._bootstrap>", line 274, in _load_module_shim
  File "<frozen importlib._bootstrap>", line 711, in _load
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 855, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/home/ubuntu/data/starship_main/cogs/CogManager/cogs/edittextchannel/__init__.py", line 1, in <module>
    from .AAA3A_utils import CogsUtils  # isort:skip
  File "/home/ubuntu/data/starship_main/cogs/CogManager/cogs/edittextchannel/AAA3A_utils/__init__.py", line 1, in <module>
    from .cogsutils import CogsUtils
  File "/home/ubuntu/data/starship_main/cogs/CogManager/cogs/edittextchannel/AAA3A_utils/cogsutils.py", line 27, in <module>
    from .cog import Cog
  File "/home/ubuntu/data/starship_main/cogs/CogManager/cogs/edittextchannel/AAA3A_utils/cog.py", line 11, in <module>
    from .context import Context
  File "/home/ubuntu/data/starship_main/cogs/CogManager/cogs/edittextchannel/AAA3A_utils/context.py", line 4, in <module>
    from redbot.core.utils import can_user_react_in
ImportError: cannot import name 'can_user_react_in' from 'redbot.core.utils' (/home/ubuntu/redenv/lib/python3.9/site-packages/redbot/core/utils/__init__.py)
AAA3A-AAA3A commented 2 years ago

Hello, This error was already fixed yesterday with the most recent commit. Have a nice day, AAA3A

cool-aid-man commented 2 years ago

Thanks! It works now.

I have one suggestion for the edittextchannel slowmodedelay cmd, can you make it, so it accepts the units like s,m,h (seconds, minutes, hours) instead of always relying on seconds to input.

so, edittextchannel slowmodedelay 5s would be for a 5 seconds slowmode.

AAA3A-AAA3A commented 2 years ago

I will think about it. Thanks for the suggestion.

AAA3A-AAA3A commented 2 years ago

Hello, Thanks again for your suggestion. The change you wanted has been made. I haven't pushed it yet, but it will be available in the cog soon. Also know that EditRole, EditTextChannel and EditVoiceChannel will be merged into one DiscordEdit cog. Have a nice day, AAA3A

cool-aid-man commented 2 years ago

Thank you AAA3A appreciate it, And One single cog for all three very important cogs would be super useful. Thanks again! Have a great day ahead :), -Cool aid

AAA3A-AAA3A commented 2 years ago

DiscordEdit has been pushed. I made this change because I'm thinking of adding EditGuild, EditForumChannel, EditCategory...