55 lines
		
	
	
		
			2.2 KiB
		
	
	
	
		
			Forth
		
	
	
	
	
	
			
		
		
	
	
			55 lines
		
	
	
		
			2.2 KiB
		
	
	
	
		
			Forth
		
	
	
	
	
	
[<Microsoft.FSharp.Core.RequireQualifiedAccess>]
 | 
						|
module Degenz.GuildEnvironment
 | 
						|
 | 
						|
open System
 | 
						|
open DSharpPlus
 | 
						|
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 environment = getVar "ENVIRONMENT"
 | 
						|
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 tokenSlots = getVar "TOKEN_SLOTS"
 | 
						|
let tokenAdmin = getVar "TOKEN_ADMINBOT"
 | 
						|
let tokenMixpanel = getVar "TOKEN_MIXPANEL"
 | 
						|
let channelEventsHackerBattle = getId "CHANNEL_EVENTS_HACKER_BATTLE"
 | 
						|
let channelTraining = getId "CHANNEL_TRAINING"
 | 
						|
let channelArmory = getId "CHANNEL_ARMORY"
 | 
						|
let channelBattle = getId "CHANNEL_BATTLE"
 | 
						|
let channelWelcome = getId "CHANNEL_WELCOME"
 | 
						|
let channelWhitelist = getId "CHANNEL_WHITELIST"
 | 
						|
//let channelTosserTed = getId "CHANNEL_TOSSERTED"
 | 
						|
let channelShelters = getId "CHANNEL_SHELTERS"
 | 
						|
let channelSlots = getId "CHANNEL_SLOTS"
 | 
						|
//let channelBackAlley = getId "CHANNEL_BACKALLEY"
 | 
						|
//let channelMarket = getId "CHANNEL_MARKET"
 | 
						|
//let channelAccessoryShop = getId "CHANNEL_ACCESSORIES"
 | 
						|
 | 
						|
//let channelThievery = getId "CHANNEL_THIEVERY"
 | 
						|
let botIdHackerBattle = getId "BOT_HACKER_BATTLE"
 | 
						|
let botIdArmory = getId "BOT_ARMORY"
 | 
						|
//let botIdTosserTed = getId "BOT_TOSSERTED"
 | 
						|
//let botInviter = getId "BOT_INVITER"
 | 
						|
let roleTrainee = getId "ROLE_TRAINEE"
 | 
						|
let roleHacker = getId "ROLE_HACKER"
 | 
						|
let rolePrisoner = getId "ROLE_PRISONER"
 | 
						|
let roleWhitelist = getId "ROLE_WHITELIST"
 | 
						|
let roleAdmin = getId "ROLE_ADMIN"
 | 
						|
 | 
						|
let mutable botUserHackerBattle : DiscordUser option = None
 | 
						|
let mutable botUserArmory : DiscordUser option = None
 | 
						|
let mutable botClientRecruit : DiscordClient option = None
 |