📝 Add config values used by Flask Discord in docs

This commit is contained in:
thec0sm0s
2020-10-07 17:45:00 +05:30
parent a84b36e8ff
commit 8bc15b23ad

View File

@@ -62,15 +62,27 @@ Exceptions
.. autoclass:: flask_discord.AccessDenied
:members:
Config
----------
Configuration Values
--------------------
| ``DISCORD_CLIENT_ID`` Discord client ID is the id for you Discord app that will be used for the authentication
|
| ``DISCORD_CLIENT_SECRET`` Discord client secret is the secret found on the developer portal
|
| ``DISCORD_REDIRECT_URI`` URL to your callback endpoint the redirect url when a user has been authenticated
|
| ``DISCORD_BOT_TOKEN`` Required to access BOT resources; It is the token from a pot account connected to the application in the developer portal
|
| ``DISCORD_USERS_CACHE_MAX_LIMIT`` ??
Flask Discord attempts to fetch expected configuration keys from the config of initialized flask app.
.. py:data:: DISCORD_CLIENT_ID
Client ID of your Discord application. Can be retrieved from your Discord developers dashboard. This can be also passed as ``client_id`` to :py:class:`flask_discord.DiscordOAuth2Session` constructor.
.. py:data:: DISCORD_CLIENT_SECRET
The client secret of your Discord application. Can also be retrieved from your Discord developers dashboard. This can be also passed as ``client_secret`` to :py:class:`flask_discord.DiscordOAuth2Session` constructor.
.. py:data:: DISCORD_REDIRECT_URI
The default URL to use to redirect user to after authorization. This should be exactly same as what you've specified in Redirects in Discord developers dashboard OAuth2 section. This can be also passed as ``redirect_uri`` to :py:class:`flask_discord.DiscordOAuth2Session` constructor.
.. py:data:: DISCORD_BOT_TOKEN
The bot token of the application. This is required when you also need to access bot scope resources beyond the normal resources provided by the OAuth. This can be also passed as ``bot_token`` to :py:class:`flask_discord.DiscordOAuth2Session` constructor.
.. py:data:: DISCORD_USERS_CACHE_MAX_LIMIT
Flask Discord has an internal caching layer to prevent rate limits. This specifies the max number of users to be cached using the default Last Frequently Used cache implementation. Defaults to ``100``.