Skip to content

Commit

Permalink
birthday: Add a permission for adding birthdays
Browse files Browse the repository at this point in the history
  • Loading branch information
timschumi committed Oct 1, 2024
1 parent 8b7d168 commit c8395e1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cogs/birthday.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ async def list(self, ctx, query=""):

@birthdays.command()
@commands.guild_only()
@basedbot.has_permissions("birthday.add")
async def add(self, ctx, birthdate):
"""Adds a birthday (DD.MM.) for the calling user"""

Expand Down Expand Up @@ -277,5 +278,6 @@ async def setup(bot):
conv=Optional[discord.Role],
description="The role that birthday-people should get.",
)
bot.perm.register("birthday.add", base=True, pretty_name="Add birthdays")
bot.perm.register("birthday.list", base=True, pretty_name="List birthdays")
await bot.add_cog(Birthdays(bot))

0 comments on commit c8395e1

Please sign in to comment.