From 616695b8f56f42658c0afb0ad1a6739b23845ffd Mon Sep 17 00:00:00 2001 From: Von Random Date: Thu, 21 Nov 2024 15:48:34 +0200 Subject: [PATCH] test templates more --- pgbotlib/response.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/pgbotlib/response.py b/pgbotlib/response.py index 010cf69..4f6928e 100644 --- a/pgbotlib/response.py +++ b/pgbotlib/response.py @@ -92,18 +92,16 @@ class Responder: async def template(self, response: str, event: telethon.events.common.EventBuilder) -> str: - template = None result = response if '' in response: - template = '' sender = await event.get_sender() - result = result.replace(template, username) + result = result.replace('', username) + result += ' I AM TEST' if '' in response: - template = '' peer_id = event.message.peer_id users = await self.client.get_participants(entity=peer_id) sender = random.choice(users)[0] - result = result.replace(template, username) + result = result.replace('', username) return result async def respond(self,