Discord-oauth2.py

Latest version: v1.2.1

Safety actively analyzes 688293 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 2

1.2.1

Updated `Client.generate_uri`
- Fixed types for some parameters
- Added `skip_prompt` parameter, which sets `prompt=none` when `True`.

1.2.0

Added URI Generator
- Added `Client.uri_generator` which generates an OAuth2 uri from provided inputs request in 6 - [View documentation](https://discord-oauth2py.readthedocs.io/en/latest/client.html#discordoauth2.Client.generate_uri)

1.1.0

Changelog

Added Linked Roles Support
- Added `Client.update_linked_roles_metadata(metadata)` which takes a list of [application role connection metadata](https://discord.com/developers/docs/resources/application-role-connection-metadata#application-role-connection-metadata-object)
- Added `PartialAccessToken.update_metadata(platform_name=None, username=None, **metadata)` platform name and username are strings, and `metadata` is a keyword args mapping metadata keys to values, accepting the types: `bool`, `int`, `datetime` or a `str` (only for iso time).
Added Token Revocation Support
- Added `PartialAccessToken.revoke()` shorthand to revoke an access token.
- Added `AccessToken.revoke_refresh_token()` shorthand to revoke a refresh token.
- Added `Client.revoke_token(token, token_type=None)` to revoke any oauth2 token related to the client.

1.0.1

Fixed a bug that broke `PartialAccessToken.join_guild`. It now requires a `user_id` parameter along with a `guild_id` parameter.

1.0.0

I rewrote the library and uploaded it a pypi!!!

added a new function for client_credentails_grant which will generate an AccessToken for the owners account and much more. I'll update the README.md in a moment.

This should automatically trigger a workflow to publish the library onto pypi if im not mistaken.

happy coding!

0.4beta

- Added `webhook` property to `access_token`, will be a [webhook object](https://discord.com/developers/docs/resources/webhook#webhook-object) if the `webhook` scope is provided otherwise it will be `None`.
- Added `guild` property to `access_token`, will be a [guild object](https://discord.com/developers/docs/resources/guild#guild-object) that the bot joined if the `bot` scope was provided otherwise it will be `None`
- `Exception` is raised if an HTTP error occurs in `discordoauth2.exchange_code` or `discordoauth2.refresh_token`

_No code should break this release, but it may next release._

Page 1 of 2

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.