41 lines
1.7 KiB
Forth
41 lines
1.7 KiB
Forth
[<Microsoft.FSharp.Core.RequireQualifiedAccess>]
|
|
module Degenz.GuildEnvironment
|
|
|
|
open System
|
|
open DSharpPlus.Entities
|
|
open dotenv.net
|
|
|
|
DotEnv.Load(DotEnvOptions(envFilePaths = [ "../../../../.dev.env" ], overwriteExistingVars = false))
|
|
//DotEnv.Load(DotEnvOptions(envFilePaths = [ "../../../../.stag.env" ], overwriteExistingVars = false))
|
|
//DotEnv.Load(DotEnvOptions(envFilePaths = [ "../../../../.prod.env" ], overwriteExistingVars = false))
|
|
|
|
let getVar str = Environment.GetEnvironmentVariable(str)
|
|
let getId str = getVar str |> uint64
|
|
|
|
let connectionString = (getVar "DATABASE_URL").Replace("postgresql://", "postgres://").Replace("?sslmode=require", "")
|
|
|
|
let guildId = getId "DISCORD_GUILD"
|
|
let tokenPlayerInteractions = getVar "TOKEN_PLAYER_INTERACTIONS"
|
|
let tokenSteal = getVar "TOKEN_STEAL"
|
|
let tokenHackerBattle = getVar "TOKEN_HACKER_BATTLE"
|
|
let tokenStore = getVar "TOKEN_STORE"
|
|
let tokenInviter = getVar "TOKEN_INVITER"
|
|
let channelEventsHackerBattle = getId "CHANNEL_EVENTS_HACKER_BATTLE"
|
|
let channelTraining = getId "CHANNEL_TRAINING"
|
|
let channelArmory = getId "CHANNEL_ARMORY"
|
|
//let channelBackAlley = getId "CHANNEL_BACKALLEY"
|
|
let channelBattle = getId "CHANNEL_BATTLE"
|
|
//let channelMarket = getId "CHANNEL_MARKET"
|
|
//let channelAccessoryShop = getId "CHANNEL_ACCESSORIES"
|
|
let channelWelcome = getId "CHANNEL_WELCOME"
|
|
|
|
//let channelThievery = getId "CHANNEL_THIEVERY"
|
|
let botIdHackerBattle = getId "BOT_HACKER_BATTLE"
|
|
let botIdArmory = getId "BOT_ARMORY"
|
|
//let botInviter = getId "BOT_INVITER"
|
|
let roleTrainee = getId "ROLE_TRAINEE"
|
|
let rolePrisoner = getId "ROLE_PRISONER"
|
|
|
|
let mutable botUserHackerBattle : DiscordUser option = None
|
|
let mutable botUserArmory : DiscordUser option = None
|