[docs]asyncdefmaybe_prompt_for_playlist(cog:DISCORD_COG_TYPE,context:PyLavContext,playlists:list[Playlist])->Playlist|None:iflen(playlists)>1:playlist_picker=PlaylistPickerMenu(cog=cog,bot=cog.bot,source=PlaylistPickerSource(guild_id=context.guild.id,cog=cog,pages=playlists,message_str=shorten_string(max_length=100,string=_("Multiple playlists matched. Pick the one which you meant.")),),selector_cls=PlaylistSelectSelector,delete_after_timeout=True,clear_buttons_after=True,starting_page=0,selector_text=shorten_string(max_length=100,string=_("Pick a playlist.")),original_author=context.interaction.userifcontext.interactionelsecontext.author,)awaitplaylist_picker.start(context)try:awaitplaylist_picker.wait_for_response()playlist=playlist_picker.resultexceptTimeoutError:playlist=Noneelse:playlist=playlists[0]returnplaylist