Skip to content

Commit 912801c

Browse files
AmbratolmAmbratolm
authored andcommitted
Farm: XP log embed to prevent mention ping.
1 parent abdeeca commit 912801c

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

bot/cogs/game_cogs/farm_cog.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def cog_unload(self):
4545
# ----------------------------------------------------------------------------------------------------
4646
# * Log XP Gains
4747
# ----------------------------------------------------------------------------------------------------
48-
@tasks.loop(seconds=60.0)
48+
@tasks.loop(seconds=5.0)
4949
async def log_xp_gains(self):
5050
log_copy = self.xp_gain_log.copy()
5151
self.xp_gain_log.clear()
@@ -75,8 +75,13 @@ async def log_xp_gains(self):
7575
if not description_lines:
7676
continue
7777

78+
embed = EmbedX.info(
79+
emoji="⏫",
80+
title="Experience Gains",
81+
description="\n".join(description_lines),
82+
)
7883
try:
79-
await log_channel.send("\n".join(description_lines))
84+
await log_channel.send(embed=embed)
8085
except HTTPException as e:
8186
print(
8287
f"Failed to send XP log to #{log_channel.name} in {guild.name}: {e}"

0 commit comments

Comments
 (0)