May be one or more entities (username/peer/etc.), preferably IDs. By default, only matching chats will be handled.
总而言之:
MY_CHANNEL = -1001234 # or 'username', or invite link, etc.
@client.on(events.NewMessage(MY_CHANNEL))
async def my_event_handler(event):
pass # do work...
对Updates in the docs的介绍解释了如何注册处理程序:
它有到^{} 的链接,我们可以看到它有以下可选参数:
它还声称:
在这里,我们可以找到
chats
的文档:总而言之:
相关问题 更多 >
编程相关推荐