Add import to Integration

This commit is contained in:
thec0sm0s
2020-05-15 18:08:27 +05:30
parent a314928fbf
commit 318e2318b8
2 changed files with 5 additions and 0 deletions

View File

@@ -52,6 +52,10 @@ class DiscordOAuth2HttpClient(abc.ABC):
os.environ["OAUTHLIB_INSECURE_TRANSPORT"] = "true"
app.discord = self
@property
def user_id(self):
"""A property which returns Discord user ID if it exists in flask :py:attr:`flask.session` object."""
@staticmethod
def _token_updater(token):
session["DISCORD_OAUTH2_TOKEN"] = token