Closed chrisdewa closed 3 years ago
Implemented suggested improvements by @nwunderly.
Im not entirely sure the methods session
and session_from_token
are adequately named though
Im not entirely sure the methods
session
andsession_from_token
are adequately named though
Yeah, I was thinking the same thing. It's all I can think of, though.
About to push some changes here, I think this is looking pretty good now.
Modified
DiscordOAuthClient
methodsession
to accepttoken
parameter.DiscordOAuthSession
has the following changes:token
parameter for pervously generated access tokens.self._discord_token
is now public (self.discord_token
)__aenter__
overwrite and moved token fetching to methodself._discord_request
, this allows sessions to be created and used even without a context manager.