mirror of
https://github.com/yawaflua/Flask-Discord.git
synced 2025-12-10 04:19:31 +02:00
Prefix all configs with DISCORD_ to prevent un intended user override
This commit is contained in:
@@ -1,24 +1,21 @@
|
||||
API_BASE_URL = "https://discordapp.com/api"
|
||||
DISCORD_API_BASE_URL = "https://discordapp.com/api"
|
||||
|
||||
AUTHORIZATION_BASE_URL = API_BASE_URL + "/oauth2/authorize"
|
||||
TOKEN_URL = API_BASE_URL + "/oauth2/token"
|
||||
DISCORD_AUTHORIZATION_BASE_URL = DISCORD_API_BASE_URL + "/oauth2/authorize"
|
||||
DISCORD_TOKEN_URL = DISCORD_API_BASE_URL + "/oauth2/token"
|
||||
|
||||
|
||||
ALL_SCOPES = [
|
||||
DISCORD_OAUTH_ALL_SCOPES = [
|
||||
"bot", "connections", "email", "identify", "guilds", "guilds.join",
|
||||
"gdm.join", "messages.read", "rpc", "rpc.api", "rpc.notifications.read", "webhook.incoming",
|
||||
]
|
||||
|
||||
DEFAULT_SCOPES = [
|
||||
DISCORD_OAUTH_DEFAULT_SCOPES = [
|
||||
"identify", "email", "guilds", "guilds.join"
|
||||
]
|
||||
|
||||
|
||||
IMAGE_BASE_URL = "https://cdn.discordapp.com/"
|
||||
IMAGE_FORMAT = "png"
|
||||
ANIMATED_IMAGE_FORMAT = "gif"
|
||||
USER_AVATAR_BASE_URL = IMAGE_BASE_URL + "avatars/{user_id}/{avatar_hash}.{format}"
|
||||
GUILD_ICON_BASE_URL = IMAGE_BASE_URL + "icons/{guild_id}/{icon_hash}.png"
|
||||
|
||||
|
||||
# TODO: Prefix configs with DISCORD_ to avoid users overriding it with their own configs.
|
||||
DISCORD_IMAGE_BASE_URL = "https://cdn.discordapp.com/"
|
||||
DISCORD_IMAGE_FORMAT = "png"
|
||||
DISCORD_ANIMATED_IMAGE_FORMAT = "gif"
|
||||
DISCORD_USER_AVATAR_BASE_URL = DISCORD_IMAGE_BASE_URL + "avatars/{user_id}/{avatar_hash}.{format}"
|
||||
DISCORD_GUILD_ICON_BASE_URL = DISCORD_IMAGE_BASE_URL + "icons/{guild_id}/{icon_hash}.png"
|
||||
|
||||
Reference in New Issue
Block a user