Skip to content

Commit

Permalink
made lord chancellor gender neutal (liege)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mole1424 committed Jun 20, 2024
1 parent 4b33b04 commit 3c68528
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
18 changes: 9 additions & 9 deletions cogs/commands/birthday.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
LONG_HELP_TEXT = """
Hapy birthday!!!!
As is tradtion, wish our dear lord chancellor of the computer a happy birthday
As is tradtion, wish our dear liege chancellor of the computer a happy birthday
"""


Expand All @@ -40,7 +40,7 @@ async def birthday(self, ctx: Context):

@birthday.command(help=LONG_HELP_TEXT, brief="HAPPY BIRTHDAY!!!!")
async def wish(self, ctx: Context):
"""Adds 1 to the age of the Lord Chancellor and wishes them a happy birthday"""
"""Adds 1 to the age of the Liege Chancellor and wishes them a happy birthday"""
first = False
current_date = utc.localize(datetime.now()).astimezone(
timezone("Europe/London")
Expand All @@ -57,31 +57,31 @@ async def wish(self, ctx: Context):
except (SQLAlchemyError, OperationalError):
pass
await ctx.reply(
f"Happy birthday <@{CONFIG.LORD_CHANCELLOR_ID}>!!!!! <:ferris_party:1016463393156247623> {f' You are now {self.age} years old' if first else ''}"
f"Happy birthday <@{CONFIG.LIEGE_CHANCELLOR_ID}>!!!!! <:ferris_party:1016463393156247623> {f' You are now {self.age} years old' if first else ''}"
)

@birthday.command(help=LONG_HELP_TEXT, brief="Lord Chancellor age")
@birthday.command(help=LONG_HELP_TEXT, brief="Liege Chancellor age")
async def age(self, ctx: Context):
"""Get the current age of the Lord Chancellor"""
name = self.bot.get_user(CONFIG.LORD_CHANCELLOR_ID).name
"""Get the current age of the Liege Chancellor"""
name = self.bot.get_user(CONFIG.LIEGE_CHANCELLOR_ID).name
await ctx.reply(f"{name} is {self.age}")

@birthday.command(help=LONG_HELP_TEXT, brief="User happy birthday count")
async def user(self, ctx: Context, user: User):
"""How many times has someone wished the Lord Chancellor a happy birthday?"""
"""How many times has someone wished the Liege Chancellor a happy birthday?"""
db_user = get_database_user(user)
num = (
db_session.query(db_Birthday)
.filter(db_Birthday.user_id == db_user.id)
.count()
)
await ctx.reply(
f"{user.name} has wished the Lord Chancellor a happy birthday {num} times"
f"{user.name} has wished the Liege Chancellor a happy birthday {num} times"
)

@birthday.command(help=LONG_HELP_TEXT, brief="leaderboard")
async def leaderboard(self, ctx: Context):
"""Who has wished the Lord Chancellor a happy birthday the most?"""
"""Who has wished the Liege Chancellor a happy birthday the most?"""
leaderboard = (
db_session.query(db_Birthday.user_id, func.count(db_Birthday.user_id))
.group_by(db_Birthday.user_id)
Expand Down
4 changes: 2 additions & 2 deletions config.example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ config:
You are Apollo, a Discord Bot in the University of Warwick Computing Society Discord.
# API key for access to apollo's container runtime
portainer_api_key: portainer
# Lord Chancellor User ID
lord_chancellor_id: 1234
# Liege Chancellor User ID
liege_chancellor_id: 1234

# Configuration
# Level of messages logged to file
Expand Down
2 changes: 1 addition & 1 deletion config/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def __init__(self, filepath: str):
self.AI_CHAT_CHANNELS: list[int] = parsed.get("ai_chat_channels")
self.AI_SYSTEM_PROMPT: str = parsed.get("ai_system_prompt")
self.PORTAINER_API_KEY: str = parsed.get("portainer_api_key")
self.LORD_CHANCELLOR_ID: int = parsed.get("lord_chancellor_id")
self.LIEGE_CHANCELLOR_ID: int = parsed.get("liege_chancellor_id")

# Configuration
self.LOG_LEVEL: str = parsed.get("log_level")
Expand Down

0 comments on commit 3c68528

Please sign in to comment.