Spaces:
Sleeping
Sleeping
Update bot_core.py
Browse files- bot_core.py +6 -0
bot_core.py
CHANGED
|
@@ -266,6 +266,12 @@ async def on_message_from_sources(event: events.NewMessage.Event):
|
|
| 266 |
except Exception:
|
| 267 |
pass
|
| 268 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 269 |
# 1) FILTER MCAP (jika berhasil diparse & < threshold → skip)
|
| 270 |
mc_usd = parse_mcap_usd(txt)
|
| 271 |
if mc_usd is not None:
|
|
|
|
| 266 |
except Exception:
|
| 267 |
pass
|
| 268 |
|
| 269 |
+
# 0) SKIP jika pesan berisi "Leaderboard Rank : Pending"
|
| 270 |
+
# longgar: terima variasi spasi/tanda baca/huruf besar-kecil
|
| 271 |
+
if re.search(r"(?i)Leaderboard\s*Rank\s*[:=\-]?\s*Pending", txt):
|
| 272 |
+
logger.info("SKIP| pesan mengandung 'Leaderboard Rank : Pending' → abaikan")
|
| 273 |
+
return
|
| 274 |
+
|
| 275 |
# 1) FILTER MCAP (jika berhasil diparse & < threshold → skip)
|
| 276 |
mc_usd = parse_mcap_usd(txt)
|
| 277 |
if mc_usd is not None:
|