diff options
| author | Guillermo Serrahima <dev@vylion.com> | 2026-02-02 16:37:23 +0100 |
|---|---|---|
| committer | Guillermo Serrahima <dev@vylion.com> | 2026-02-02 16:37:23 +0100 |
| commit | 2d143ebcaf238707ddb58a4f354f30262e60e3e0 (patch) | |
| tree | eca29f4e8c9968b1b06b21a320df1f513ba7257c /velascobot2 | |
| parent | e47dec1c86a871776d476f802c74abf74b93cc61 (diff) | |
| download | velascobot2-2d143ebcaf238707ddb58a4f354f30262e60e3e0.tar.xz velascobot2-2d143ebcaf238707ddb58a4f354f30262e60e3e0.zip | |
Wake up anti-spam check
Diffstat (limited to 'velascobot2')
| -rw-r--r-- | velascobot2/bot.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/velascobot2/bot.py b/velascobot2/bot.py index fe2e2ce..bf1a161 100644 --- a/velascobot2/bot.py +++ b/velascobot2/bot.py @@ -510,6 +510,10 @@ class Bot: pass async def wake_up(self, exclusive: bool = False) -> None: + # Make the bot mute itself for 1 minute while it catches up with chats + # to avoid spamming with several messages in a row + self.messenger.set_mute_timer(int(time.perf_counter())) + if not self.messenger.wake_up: return if len(self.motd_list) == 0: |
