Hi i started to use your library to play music and i got that error
Traceback (most recent call last): File "/home/pi/.local/lib/python3.9/site-packages/lightbulb/app.py", line 1154, in invoke_application_command await context.invoke() File "/home/pi/.local/lib/python3.9/site-packages/lightbulb/context/base.py", line 292, in invoke await self.command.invoke(self) File "/home/pi/.local/lib/python3.9/site-packages/lightbulb/commands/base.py", line 544, in invoke await self(context, **kwargs) File "/home/pi/.local/lib/python3.9/site-packages/lightbulb/commands/base.py", line 459, in __call__ return await self.callback(context, **kwargs) File "/home/pi/M.A.R.I.O.N/test_bot/bot.py", line 147, in cmd_play_voice await lavalink.play(ctx.guild_id, result[0], ctx.author.id) # play the first result File "/home/pi/.local/lib/python3.9/site-packages/lavaplayer/client.py", line 295, in play raise NodeError("Node not found", guild_id) lavaplayer.exceptions.NodeError: ('Node not found', 791009507126804511)
Here is my code
@lightbulb.add_cooldown(15.0, 1, lightbulb.UserBucket)
@lightbulb.add_checks(lightbulb.owner_only)
@lightbulb.option("musique","Ce que vous souhaitez faire lire à M.A.R.I.O.N") # Option definition 1) --> the name of the option 2) --> The description of the option
@lightbulb.command("play", "Connecter M.A.R.I.O.N") # Command definition 1) --> the name of the command 2) --> The description of the command
@lightbulb.implements(lightbulb.SlashCommand)
async def cmd_play_voice(ctx: lightbulb.SlashContext):
await ctx.respond(ctx.member.nickname)
query = ctx.options.musique # get query from options
result = await lavalink.auto_search_tracks(query) # search for the query
if not result:
await ctx.respond("not found result for your query")
return
# Playlist
if isinstance(result, lavaplayer.PlayList):
await lavalink.add_to_queue(ctx.guild_id, result.tracks, ctx.author.id)
await ctx.respond(f"added {len(result.tracks)} tracks to queue")
return
print(result[0])
print(ctx.author.id)
print(ctx.guild_id)
await lavalink.play(ctx.guild_id, result[0], ctx.author.id) # play the first result
await ctx.respond(f"[{result[0].title}]({result[0].uri})") # send the embed```
If you need i can give you the complete file