This commit is contained in:
2025-02-16 13:16:53 -05:00
parent f61c437bf5
commit a8014f286a
6 changed files with 233 additions and 11 deletions

View File

@ -106,13 +106,13 @@ class Radio(commands.Cog):
but they exist.
"""
logging.info("Detected VC not playing... playing!")
source = discord.FFmpegOpusAudio(self.STREAM_URL,
source: discord.FFmpegAudio = discord.FFmpegOpusAudio(self.STREAM_URL,
before_options="-timeout 3000000")
vc.play(source, after=lambda e: logging.info("Error: %s", e) if e else None) # type: ignore
vc.play(source, # type: ignore
after=lambda e: logging.info("Error: %s", e) if e\
else None)
# Get Now Playing
np_track = await get_now_playing()
np_track: Optional[str] = await get_now_playing()
if np_track and not self.LAST_NP_TRACK == np_track:
self.LAST_NP_TRACK = np_track
if isinstance(vc.channel, discord.VoiceChannel):