diff --git a/stdplugins/all.py b/stdplugins/all.py index 2379ffd..e263750 100644 --- a/stdplugins/all.py +++ b/stdplugins/all.py @@ -4,12 +4,15 @@ from telethon import events + @borg.on(events.NewMessage(pattern=r"\.all", outgoing=True)) async def _(event): if event.fwd_from: return await event.delete() mentions = "@all" - async for x in borg.iter_participants(await event.get_input_chat(), 100): + chat = await event.get_input_chat() + async for x in borg.iter_participants(chat, 100): mentions += f"[\u2063](tg://user?id={x.id})" - await event.respond(mentions) + await borg.send_message( + chat, mentions, reply_to=event.message.reply_to_msg_id)