fix randomname functionality

This commit is contained in:
Von Random 2024-11-21 15:37:06 +02:00
parent 4f66fcf958
commit e6a0726b0b

View file

@ -99,6 +99,7 @@ class Responder:
sender = await event.get_sender()
case response if '<randomname>' in response:
template = '<randomname>'
peer_id = event.message.peer_id
users = await self.client.get_participants(entity=peer_id)
sender = random.choice(users)[0]
if template: