Skip to content

Commit

Permalink
Merge pull request #149 from satisfactorymodding/Feyko-patch-1
Browse files Browse the repository at this point in the history
Disable levelling DMs
  • Loading branch information
Feyko authored Oct 13, 2024
2 parents 3e65a8f + ef5d7b8 commit 2e6ea40
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
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

0 comments on commit 2e6ea40

Please sign in to comment.