This commit is contained in:
2024-11-10 19:48:47 +01:00
parent c225a3e252
commit 3d02d06862
3 changed files with 17 additions and 8 deletions
+6 -5
View File
@@ -16,6 +16,7 @@ from constants import (
INITIAL_TIME_WAIT,
MASTER_TIMEOUT,
OPENAICLIENT,
WORD_REACTIONS
)
@@ -85,13 +86,13 @@ class Events(commands.Cog):
await message.reply(DATA["fabryczka"])
if tdelta > INITIAL_TIME_WAIT:
for word in self.word_reactions:
for word in WORD_REACTIONS:
if re.search(r"\b" + word + r"\b", message.content):
tdelta = datetime.now() - self.word_reactions[word][2]
tdelta = datetime.now() - WORD_REACTIONS[word][2]
tdelta = tdelta.total_seconds()
security_clearance = self.word_reactions[word][4]
reaction = self.word_reactions[word][3]
if tdelta > self.word_reactions[word][1]:
security_clearance = WORD_REACTIONS[word][4]
reaction = WORD_REACTIONS[word][3]
if tdelta > WORD_REACTIONS[word][1]:
# TODO: to zrobic reactiony
self.logger.info("Ping z procedury reakcji")
if reaction: