【发布时间】:2022-01-19 01:12:08
【问题描述】:
现在,我假设 e.chat 采用我的群组/频道的特定 URL,无论它是公共的还是私有的,并用作过滤器,如果像用户这样的任何事件加入或离开我的群组/频道,它将打印在控制台中。
@bot.on(events.ChatAction(func=lambda e: not e.is_private and e.chat == "https://t.me/123"))
async def imp_fun(event):
print(event.user_joined)
print(event.user_left)
【问题讨论】:
标签: python python-3.x telegram telegram-bot telethon