Hi, I'm trying to make a discord bot(disnake) with spotipy, but for most things i need redirect uri. I passed it, but when the user calls command with authorization, my bot stucks every time until log in. How can i remove freezes? And another question: How can user get link to authorize app?
Code:
async def like_button(inter):
# Creating *Bot thinking...* to avoid interaction stuck, where inter - interaction, when user press button
await inter.response.defer()
...some_code
sp = spotipy.Spotify(auth_manager=SpotifyOAuth(
client_id=spotify_client, # From database
client_secret=spotify_secret, # From database
redirect_uri="http://localhost:8888/callback",
scope="user-library-modify",
cache_handler=spotipy.MemoryCacheHandler()
))
sp.current_user_saved_tracks_add(tracks=current_tracks[0]) # Adding current track to favorites. STUCK ON THIS LINE
await inter.followup.send("Success")
...some_code
Hi, I'm trying to make a discord bot(disnake) with spotipy, but for most things i need redirect uri. I passed it, but when the user calls command with authorization, my bot stucks every time until log in. How can i remove freezes? And another question: How can user get link to authorize app? Code:
I'm sorry if something is wrong in code