bundle.discord.cogs.music.player

Guild voice playback – timing, pause/resume.

Attributes

log

Classes

GuildPlayer

Owns voice playback and timing for a single guild.

Module Contents

bundle.discord.cogs.music.player.log
class bundle.discord.cogs.music.player.GuildPlayer(on_track_end: collections.abc.Callable[[int, Exception | None], collections.abc.Coroutine[Any, Any, None]])

Owns voice playback and timing for a single guild.

play_started_at: float = 0.0
pause_offset: float = 0.0
paused_at: float | None = None
elapsed_secs() int
play(vc: discord.VoiceClient, track: bundle.youtube.track.YoutubeTrackData, guild_id: int) bool

Start FFmpeg playback. Returns False if no stream URL available.

pause(vc: discord.VoiceClient) bool

Pause playback. Returns True if state changed.

resume(vc: discord.VoiceClient) bool

Resume playback. Returns True if state changed.

stop(vc: discord.VoiceClient) None

Stop current source, suppress the after callback.