diff options
Diffstat (limited to 'config')
-rw-r--r-- | config/config.exs | 9 | ||||
-rw-r--r-- | config/runtime.exs | 5 |
2 files changed, 13 insertions, 1 deletions
diff --git a/config/config.exs b/config/config.exs index c19937a..e732049 100644 --- a/config/config.exs +++ b/config/config.exs @@ -14,13 +14,20 @@ config :chessh, RateLimits, player_session_message_burst_rate: 8, player_public_keys: 15, create_game_ms: 60 * 1000, - create_game_rate: 3 + create_game_rate: 3, + discord_notification_rate: 3, + discord_notification_rate_ms: 1000 config :chessh, Web, discord_oauth_login_url: "https://discord.com/api/oauth2/token", discord_user_api_url: "https://discord.com/api/users/@me", discord_scope: "identify" +config :chessh, DiscordNotifications, + game_move_notif_delay_ms: 3 * 60 * 1000, + game_created_notif_delay_ms: 30 * 1000, + reschedule_delay: 5 * 1000 + config :joken, default_signer: "secret" import_config "#{config_env()}.exs" diff --git a/config/runtime.exs b/config/runtime.exs index 5e03614..684e48e 100644 --- a/config/runtime.exs +++ b/config/runtime.exs @@ -3,6 +3,11 @@ import Config config :chessh, ssh_port: String.to_integer(System.get_env("SSH_PORT", "34355")) +config :chessh, DiscordNotifications, + looking_for_games_role_mention: "<@&#{System.get_env("NEW_GAME_PINGABLE_ROLE_ID")}>", + discord_game_move_notif_webhook: System.get_env("REMIND_MOVE_CHANNEL_WEBHOOK"), + discord_new_game_notif_webhook: System.get_env("NEW_GAME_CHANNEL_WEBHOOK") + config :chessh, Web, discord_client_id: System.get_env("DISCORD_CLIENT_ID"), discord_client_secret: System.get_env("DISCORD_CLIENT_SECRET"), |