Skip to content

Commit

Permalink
Little better
Browse files Browse the repository at this point in the history
  • Loading branch information
JDJGInc authored Apr 27, 2024
1 parent 8c82cf8 commit 6fd3faf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion table.sql
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
CREATE TABLE IF NOT EXISTS OAUTH_TOKENS(
USER_ID BIGINT,
ACCESS_TOKEN TEXT,
TOKEN_TYPE TEXT,
EXPIRES_IN BIGINT,
REFRESH_TOKEN BIGINT,
);
3 changes: 2 additions & 1 deletion utils/bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@
async def grab_oauth_data(
session: aiohttp.ClientSession,
access_token: str,
token_type: str,
refresh_token: str,
user_id: str,
):

api_endpoint = discord.http.Route.BASE
client_id = os.environ["client_id"]
client_secret = os.environ["client_secret"]
token_type = "Bearer"
# should be enough

headers = {"authorization": f"{token_type} {access_token}"}
# not sure if that's right but it seems to match.
Expand Down

0 comments on commit 6fd3faf

Please sign in to comment.