#Wavelink doesn't play audio.

1 messages · Page 1 of 1 (latest)

clever kelp
#

I followed the guide on how to create a bot that plays music. The bot connects and sends the "Playing..." Message but it doesn't play any audio. I used the exact code that was used in the guide.

clever kelp
#
@client.bridge_command()
async def play(ctx, search: str):
  vc = ctx.voice_client # define our voice client

  if not vc: # check if the bot is not in a voice channel
    vc = await ctx.author.voice.channel.connect(cls=wavelink.Player) # connect to the voice channel

  if ctx.author.voice.channel.id != vc.channel.id: # check if the bot is not in the voice channel
    return await ctx.respond("You must be in the same voice channel as the bot.") # return an error message

  song = await wavelink.YouTubeTrack.search(query=search, return_first=True) # search for the song

  if not song: # check if the song is not found
    return await ctx.respond("No song found.") # return an error message

  await vc.play(song) # play the song
  await ctx.respond(f"Now playing: `{vc.source.title}`") # return a message```
patent phoenix
#

Did you setup the wavelink nodes?

clever kelp
#

it connects to it as well, but I also get this now:

Node d2a7c46fcb743659 is ready!```
muted perch
#

how about you do what it says: Consider updating your Lavalink Server

clever kelp
#

Yeah, doing it now

clever kelp
#

Seems like it works now, thanks