Vexed01 / Vex-Cogs

My cogs for Red.
https://cogdocs.vexcodes.com
GNU General Public License v3.0
28 stars 21 forks source link

[Birthday] Add required role #134

Closed Vexed01 closed 2 weeks ago

Vexed01 commented 2 months ago

Add a required role that users need to have to be able to add their birthday and have it announced.

Closes #133

Currently untested

Johnnycyan commented 3 weeks ago

Any idea when this will be merged? Or did you need someone like me to test it first.

Vexed01 commented 3 weeks ago

Yes I'll merge it when I get time to test it, or if you are happy to then test it let me know if it works and I'll merge it

Zoriot commented 3 weeks ago

Yes I'll merge it when I get time to test it, or if you are happy to then test it let me know if it works and I'll merge it

I tried to test it and failed. I don't know if my steps are wrong. > is my chat prefix.

  1. Remove repo with >repo remove vex-cogs.
  2. Add repo with specific branch with >repo add vex-cogs https://github.com/Vexed01/Vex-Cogs bday-req-role.
  3. Uninstall birthday (if installed) >cog uninstall birthday.
  4. Install again >cog install vex-cogs birthday
  5. Try to load >load birthday -> get the error message.
    Log
Sep 25 00:43:18 : [2024-09-25 00:43:18] [ERROR] red: Package loading failed
Sep 25 00:43:18 : Traceback (most recent call last):
Sep 25 00:43:18 :   File "/home/zoriot/redenv/lib/python3.11/site-packages/redbot/core/core_commands.py", line 189, in _load
Sep 25 00:43:18 :     await bot.load_extension(spec)
Sep 25 00:43:18 :   File "/home/zoriot/redenv/lib/python3.11/site-packages/redbot/core/bot.py", line 1684, in load_extension
Sep 25 00:43:18 :     lib = spec.loader.load_module()
Sep 25 00:43:18 :           ^^^^^^^^^^^^^^^^^^^^^^^^^
Sep 25 00:43:18 :   File "<frozen importlib._bootstrap_external>", line 605, in _check_name_wrapper
Sep 25 00:43:18 :   File "<frozen importlib._bootstrap_external>", line 1120, in load_module
Sep 25 00:43:18 :   File "<frozen importlib._bootstrap_external>", line 945, in load_module
Sep 25 00:43:18 :   File "<frozen importlib._bootstrap>", line 290, in _load_module_shim
Sep 25 00:43:18 :   File "<frozen importlib._bootstrap>", line 721, in _load
Sep 25 00:43:18 :   File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
Sep 25 00:43:18 :   File "<frozen importlib._bootstrap_external>", line 940, in exec_module
Sep 25 00:43:18 :   File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
Sep 25 00:43:18 :   File "/home/zoriot/.local/share/Red-DiscordBot/data/Zoto/cogs/CogManager/cogs/birthday/__init__.py", line 10, in <module>
Sep 25 00:43:18 :     from .birthday import Birthday
Sep 25 00:43:18 :   File "/home/zoriot/.local/share/Red-DiscordBot/data/Zoto/cogs/CogManager/cogs/birthday/birthday.py", line 11, in <module>
Sep 25 00:43:18 :     from .commands import BirthdayAdminCommands, BirthdayCommands
Sep 25 00:43:18 :   File "/home/zoriot/.local/share/Red-DiscordBot/data/Zoto/cogs/CogManager/cogs/birthday/commands.py", line 209, in <module>
Sep 25 00:43:18 :     class BirthdayAdminCommands(MixinMeta):
Sep 25 00:43:18 :   File "/home/zoriot/.local/share/Red-DiscordBot/data/Zoto/cogs/CogManager/cogs/birthday/commands.py", line 712, in BirthdayAdminCommands
Sep 25 00:43:18 :     @bdset.command()
Sep 25 00:43:18 :      ^^^^^^^^^^^^^^^
Sep 25 00:43:18 :   File "/home/zoriot/redenv/lib/python3.11/site-packages/redbot/core/commands/commands.py", line 711, in decorator
Sep 25 00:43:18 :     result = command(*args, **kwargs)(func)
Sep 25 00:43:18 :              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Sep 25 00:43:18 :   File "/home/zoriot/redenv/lib/python3.11/site-packages/discord/ext/commands/core.py", line 1792, in decorator
Sep 25 00:43:18 :     raise TypeError('Callback is already a command.')
Sep 25 00:43:18 : TypeError: Callback is already a command.

Vexed01 commented 3 weeks ago

I'll look later, thanks for taking the time to test.

Zoriot commented 2 weeks ago

The problems seems to be fixed with that changes fc6ebc1. You can commit that to this branch, if you like.

Vexed01 commented 2 weeks ago

Thank you for taking the time to test this and the commit to fix it.

Johnnycyan commented 20 hours ago

I didn't know if I should open a new issue for this but people without the required role still show up in the "upcoming" command, and I feel like that shouldn't be the case