Chat.play_audio()

async Chat.play_audio()

Bound method play of Chat.

Use as a shortcut for:

client.play_audio(chat_id, path, volume=volume, muted=muted)
Parameters:
  • path (str) – Audio file path or audio stream URL.

  • volume (int, optional) – Playback volume level from 1 to 100. Defaults to 100.

  • muted (bool, optional) – Whether to join the voice chat muted. Defaults to False.

Example

await chat.play("song.mp3")
Returns:

bool – True on success.