summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFuwn <[email protected]>2023-01-02 21:32:08 -0800
committerFuwn <[email protected]>2023-01-02 21:32:08 -0800
commita283a22965a0182ce474f78d4296cfe44be1e6f7 (patch)
tree7761387d1738c077649be7a89eaa2dea39475887
parentfix: lines maybe (diff)
downloadrubys_song_skipper-a283a22965a0182ce474f78d4296cfe44be1e6f7.tar.xz
rubys_song_skipper-a283a22965a0182ce474f78d4296cfe44be1e6f7.zip
fix: time refresh
-rw-r--r--rubys_song_skipper/bot.py18
1 files changed, 8 insertions, 10 deletions
diff --git a/rubys_song_skipper/bot.py b/rubys_song_skipper/bot.py
index 231eae0..ba1ec30 100644
--- a/rubys_song_skipper/bot.py
+++ b/rubys_song_skipper/bot.py
@@ -30,18 +30,16 @@ class Bot(commands.Bot):
refresh = lines[1].strip()
expire = lines[2].strip()
- print(lines)
+ # if time.time() > float(expire):
+ # file.close()
- if time.time() > float(expire):
- file.close()
+ # refreshed = spotify.refresh_bearer(refresh)
+ # access = refreshed[0]
+ # new_expire = refreshed[1]
- refreshed = spotify.refresh_bearer(refresh)
- access = refreshed[0]
- new_expire = refreshed[1]
-
- with open("code.txt", "w") as file:
- file.write(f"{access}\n{refresh}\n{new_expire}")
- file.close()
+ # with open("code.txt", "w") as file:
+ # file.write(f"{access}\n{refresh}\n{new_expire}")
+ # file.close()
if data == "":
await ctx.send("i'm not authorized to do that. sign in.")