From 2a7708d6087d1cad3791efa8bc3926476096a5e9 Mon Sep 17 00:00:00 2001
From: anima
Date: Wed, 18 Feb 2026 18:27:12 +0100
Subject: [PATCH] fix reaction validate
---
skills/helper.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/skills/helper.py b/skills/helper.py
index 3536d36..9c7314b 100644
--- a/skills/helper.py
+++ b/skills/helper.py
@@ -8,7 +8,7 @@ logging.basicConfig(format='[%(asctime)s] %(process)s {%(filename)s:%(lineno)d}
class BotHelper:
"""a helper class for frequently need actions"""
__AUTHOR__ = 'anima'
- __VERSION__ = '0.3.1'
+ __VERSION__ = '0.3.2'
def __init__(self, client):
self.client = client
self.starttime = int(time.time() * 1000)
@@ -28,15 +28,15 @@ class BotHelper:
def validate_reaction(self, event: ReactionEvent):
"""validate incomming reactions befor bot start his work"""
- if isinstance(event, ReactionEvent):
+ if not isinstance(event, ReactionEvent):
+ print(event)
+ print(type(event))
logging.debug(f"reaction hast wrong type")
return False
if self.client.user == event.sender:
logging.debug(f"no reaction on reactions from bot it self")
return False
if self.starttime > event.server_timestamp:
- print(f"{self.starttime=}")
- print(f"{event.server_timestamp=}")
logging.debug(f"no reaction on reactions befor bot start")
return False
return True