on_stream_start()

Client.on_stream_start()

Decorator for handling when an audio or video stream in a voice chat starts.

Usable by Users Bots
Parameters:
  • filters (filters, optional) – Pass one or more filters.

  • group (int, optional) – The group identifier, defaults to 0.

Example

@app.on_stream_start()
async def on_play(client, update):
    print(f"Stream started in chat {update.chat_id}!")