From d1ae945026e9b9456aa099428f6eacc11e79fa39 Mon Sep 17 00:00:00 2001 From: Von Random Date: Thu, 21 Nov 2024 16:06:45 +0200 Subject: [PATCH] do not subscript users choice --- pgbotlib/response.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pgbotlib/response.py b/pgbotlib/response.py index 1e56961..3aff522 100644 --- a/pgbotlib/response.py +++ b/pgbotlib/response.py @@ -101,7 +101,7 @@ class Responder: if '' in response: peer_id = event.message.peer_id users = await self.client.get_participants(entity=peer_id) - victim = random.choice(users)[0] + victim = random.choice(users) username = self.namegen.get_name(victim) result = result.replace('', username) return result