zephyr.songbird
In-process voice playback. Plays files from the module's `zephyr.io` sandbox. Requires the `songbird` permission; declare `services = ["songbird"]` for production. Only one backend (Songbird or Lavalink) may own a guild voice session at a time.
7 functions
connect
zephyr.songbird.connect(guild_id, channel_id)Join a voice channel.
Parameters
guild_idstringGuild id.
channel_idstringVoice channel id to join.
Returns
Nothing.
Raises an error if
- the
songbirdpermission is not granted - Lavalink already owns this guild's voice session
disconnect
zephyr.songbird.disconnect(guild_id)Leave voice and release the guild backend owner.
Parameters
guild_idstringGuild id.
Returns
Nothing.
Raises an error if
- the
songbirdpermission is not granted
play_file
zephyr.songbird.play_file(guild_id, path, options?)Play an audio file from the module sandbox.
Parameters
guild_idstringGuild id.
pathstringVirtual zephyr.io path to an audio file.
optionstableoptionalchannel_id (required if not already connected) and volume (multiplier; 1.0 is normal).
Returns
Playback table with track_id, path, and status.
Raises an error if
- the
songbirdpermission is not granted
Example
zephyr.songbird.play_file(ctx.guild_id, "/cache/song.mp3", { volume = 0.75 })pause
zephyr.songbird.pause(guild_id)Pause playback.
Parameters
guild_idstringGuild id.
Returns
Nothing.
Raises an error if
- the
songbirdpermission is not granted
resume
zephyr.songbird.resume(guild_id)Resume paused playback.
Parameters
guild_idstringGuild id.
Returns
Nothing.
Raises an error if
- the
songbirdpermission is not granted
stop
zephyr.songbird.stop(guild_id)Stop the current track but stay connected.
Parameters
guild_idstringGuild id.
Returns
Nothing.
Raises an error if
- the
songbirdpermission is not granted
volume
zephyr.songbird.volume(guild_id, value)Set the playback volume multiplier.
Parameters
guild_idstringGuild id.
valuenumberVolume multiplier; 1.0 is normal volume.
Returns
Nothing.
Raises an error if
- the
songbirdpermission is not granted