Skip to content

Commit

Permalink
[Birthday 1.2.3] Fix bdset zemigrate
Browse files Browse the repository at this point in the history
  • Loading branch information
Vexed01 committed Jan 29, 2025
1 parent 4596519 commit 60eb24a
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
2 changes: 1 addition & 1 deletion birthday/birthday.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class Birthday(
Set yours and get a message and role on your birthday!
"""

__version__ = "1.2.2"
__version__ = "1.2.3"
__author__ = "@vexingvexed"

def __init__(self, bot: Red) -> None:
Expand Down
8 changes: 6 additions & 2 deletions birthday/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -628,9 +628,13 @@ async def zemigrate(self, ctx: commands.Context):
for day, users in guild_data.items():
for user_id, year in users.items():
dt = datetime.datetime.fromordinal(int(day))
year = int(year)
year = year
if year is None:
year = 1
else:
year = int(year)

if year is None or year < MIN_BDAY_YEAR:
if year < MIN_BDAY_YEAR:
year = 1

try:
Expand Down
10 changes: 9 additions & 1 deletion docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,14 @@ BetterUptime
Birthday
========

*********
``1.2.3``
*********

2025-01-29

- Fix ``bdset zemigrate``

*********
``1.2.2``
*********
Expand Down Expand Up @@ -448,7 +456,7 @@ Birthday

2022-05-20

- Show correct age a user will turn in `birthday upcoming` when their next birthday is next year
- Show correct age a user will turn in ``birthday upcoming`` when their next birthday is next year

*********
``1.1.0``
Expand Down

0 comments on commit 60eb24a

Please sign in to comment.