From d737f87654d58714563fb9294fa77a312e82de42 Mon Sep 17 00:00:00 2001 From: thecosmos Date: Tue, 7 May 2019 23:25:30 +0530 Subject: [PATCH] Minor changes --- flask_discord/client.py | 6 ++---- tests/test_app.py | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/flask_discord/client.py b/flask_discord/client.py index fa896bd..a6f80d8 100644 --- a/flask_discord/client.py +++ b/flask_discord/client.py @@ -23,12 +23,10 @@ class DiscordOAuth2Session(_http.DiscordOAuth2HttpClient): ) session["oauth2_token"] = token - @property - def user(self): + def fetch_user(self): return models.User(self.get("/users/@me")) - @property - def connections(self): + def fetch_connections(self): return models.UserConnection(self.get("/users/@me/connections")) def fetch_guilds(self): diff --git a/tests/test_app.py b/tests/test_app.py index 7db7c83..05a8aeb 100644 --- a/tests/test_app.py +++ b/tests/test_app.py @@ -24,7 +24,7 @@ def callback(): @app.route("/me") def me(): - user = discord.user + user = discord.fetch_user() return f"""