birthday fixes

This commit is contained in:
2024-09-28 21:31:22 -04:00
parent de9e184668
commit cac2bbab2f
2 changed files with 5 additions and 4 deletions

View File

@@ -44,6 +44,7 @@ Before using the cog, you need to set it up:
``` ```
[p]birthdayset channel #birthdays [p]birthdayset channel #birthdays
``` ```
If not set, the birthday message will be sent in the channel where the command is used.
## Usage ## Usage
@@ -60,7 +61,7 @@ This will assign the birthday role to the user and send a celebratory message wi
- Sends a celebratory message with random cake (or pie) emojis - Sends a celebratory message with random cake (or pie) emojis
- Automatically removes the birthday role at midnight - Automatically removes the birthday role at midnight
- Configurable timezone for role expiration - Configurable timezone for role expiration
- Option to set a specific channel for birthday announcements - Option to set a specific channel for birthday announcements (defaults to the channel where the command is used)
- Restricts usage of the birthday command to specified roles - Restricts usage of the birthday command to specified roles
- Users can assign the birthday role without needing a role higher than it in the hierarchy - Users can assign the birthday role without needing a role higher than it in the hierarchy
@@ -75,6 +76,4 @@ This will assign the birthday role to the user and send a celebratory message wi
## Support ## Support
If you encounter any issues or have questions, please open an issue on the [GitHub repository](https://github.com/pacnpal/Pac-cogs). If you encounter any issues or have questions, please open an issue on the [GitHub repository](https://github.com/pacnpal/Pac-cogs).
Enjoy celebrating birthdays with your Discord community!

View File

@@ -95,6 +95,8 @@ class Birthday(commands.Cog):
birthday_channel_id = await self.config.guild(ctx.guild).birthday_channel() birthday_channel_id = await self.config.guild(ctx.guild).birthday_channel()
if birthday_channel_id: if birthday_channel_id:
channel = self.bot.get_channel(birthday_channel_id) channel = self.bot.get_channel(birthday_channel_id)
if not channel: # If the set channel doesn't exist anymore
channel = ctx.channel
else: else:
channel = ctx.channel channel = ctx.channel