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

v2.22.12 #150

Merged
merged 3 commits into from
Oct 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions fred/cogs/levelling.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,17 +108,17 @@ async def validate_level(self):
logpayload["current_level"] = self.rank
if expected_level != self.rank:
logger.info("Correcting a mismatched level", extra=logpayload)
if self.DB_user.accepts_dms:
if expected_level > self.rank:
await Levelling.bot.send_DM(
self.member,
f"You went up from level {self.rank} to level {expected_level}! " f"Congratulations!",
)
else:
await Levelling.bot.send_DM(
self.member,
f"You went down from level {self.rank} to level {expected_level}... " f"Sorry about that",
)
# if self.DB_user.accepts_dms:
# if expected_level > self.rank:
# await Levelling.bot.send_DM(
# self.member,
# f"You went up from level {self.rank} to level {expected_level}! " f"Congratulations!",
# )
# else:
# await Levelling.bot.send_DM(
# self.member,
# f"You went down from level {self.rank} to level {expected_level}... " f"Sorry about that",
# )
self.rank = expected_level
await self.validate_role()

Expand Down Expand Up @@ -189,7 +189,7 @@ async def on_message(self, message: Message):
if datetime.now() >= self.xp_timers[profile.user_id]:
await profile.increment_xp()
else:
self.logger.info(
self.logger.debug(
"Levelling: Someone sent a message too fast and will not be awarded xp",
extra=common.message_info(message),
)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "fred"
version = "2.22.11"
version = "2.22.12"
description = "A Discord bot for the Satisfactory Modding Discord "
authors = ["Feyko <[email protected]>", "Mircea Roata <[email protected]>", "Borketh <[email protected]>"]
license = "MIT License"
Expand Down
Loading