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

[Birthday] Add required role #134

Merged
merged 2 commits into from
Oct 6, 2024
Merged

[Birthday] Add required role #134

merged 2 commits into from
Oct 6, 2024

Conversation

Vexed01
Copy link
Owner

@Vexed01 Vexed01 commented Aug 14, 2024

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
Copy link

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

@Vexed01
Copy link
Owner Author

Vexed01 commented Sep 22, 2024

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
Copy link
Contributor

Zoriot commented Sep 25, 2024

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
Copy link
Owner Author

Vexed01 commented Sep 25, 2024

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

@Zoriot
Copy link
Contributor

Zoriot commented Oct 1, 2024

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

@Vexed01
Copy link
Owner Author

Vexed01 commented Oct 6, 2024

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

@Vexed01 Vexed01 merged commit 67daa78 into master Oct 6, 2024
11 checks passed
@Vexed01 Vexed01 deleted the bday-req-role branch October 6, 2024 10:19
@Johnnycyan
Copy link

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

@Johnnycyan
Copy link

This doesn't appear to be working for me, people without the set role are still getting pinged on their birthday

@Vexed01
Copy link
Owner Author

Vexed01 commented Dec 7, 2024

I'll take a look at some point. Thanks for letting me know.

@Vexed01 Vexed01 mentioned this pull request Dec 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Set required role
3 participants