Alchemy.Voice.wait_for_end
You're seeing just the function
wait_for_end
, go back to Alchemy.Voice module for more information.
Link to this function
wait_for_end(guild, timeout \\ :infinity)
Specs
Blocks the current process until audio has stopped playing in a guild.
This is a combination of listen_for_end/1
and a receive block,
however this will return an error if the provided timeout is exceeded.
This is useful for implementing automatic track listing, e.g.
def playlist(guild, tracks) do
Enum.map(tracks, fn track ->
Voice.play_file(guild, track)
Voice.wait_for_end(guild)
end)
end