-2

I want the pyrogram track library to be able to filter more than 1 channel @app.on_message(filters.chat("test channel"))

I tried @app.on_message(filters.chat(chats=Chats)) but it didn't work..

Chats = '@test', '@test', '@test'

@app.on_message(filters.chat(chats=Chats))
ArtL
  • 1
  • make sure you do not need to define a type of middle-ware function to get your desired task and also a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example) would help others to answer the question. – user11717481 Jan 14 '23 at 17:01

1 Answers1

2

filters.chat() takes either a string representing the username or phone number, an or integer representing the chat_id, or a list of the former two.

Chats = [
   "username",
   "49123456789",  # phone number with international prefix
   789456123  # chat_id
]
@app.on_message(filters.chat(Chats))

See Pyrogram's Documentation on the available Filters and how to use them:

ColinShark
  • 1,047
  • 2
  • 10
  • 18