The bot is joining the voice channel but is not playing any music (no error).
I am using Nextcord and Wavelink.
(Yes, cog is loaded.)
import nextcord
from nextcord.ext import commands
import wavelink
class play(commands.Cog):
def __init__(self, bot):
self.bot = bot
@commands.command()
async def play(self, ctx: commands.Context, *, search: wavelink.YouTubeTrack):
if not ctx.voice_client:
vc: wavelink.Player = await ctx.author.voice.channel.connect(cls=wavelink.Player)
elif getattr(ctx.author.voice, "channel", None):
ctx.message.delete()
embed = nextcord.Embed(title="Error", color= nextcord.Color.dark_red())
embed.add_field(name="Error ID", value="01", inline=False)
embed.add_field(name="Error Name", value="Non VC detected", inline=False)
return await ctx.send(embed=embed)
else:
vc: wavelink.Player = ctx.voice_client
await vc.play(search)
def setup(bot):
bot.add_cog(play(bot))