Skip to content

TypeError: unsupported type annotation <class 'wavelink.tracks.YouTubeTrack'> #249

Description

@glitchplaysgames714

im trying to make a music bot with discord.py and im getting this error

the error:
TypeError: unsupported type annotation <class 'wavelink.tracks.YouTubeTrack'>

the command
@client.tree.command(name="play",description="plays the music")
async def play(ctx: commands.Context, *, search: wavelink.YouTubeTrack):
if not ctx.voice_client:
vc: wavelink.Player = await ctx.author.voice.channel.connect(cls=wavelink.Player)
else:
vc: wavelink.Player = await ctx.voice_client

    vc.play(search)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions