Getting dotenv working, I think

This commit is contained in:
Joseph Ferano 2022-01-19 23:35:57 +07:00
parent bc3e574841
commit fc75c3f238
6 changed files with 19 additions and 12 deletions

2
.gitignore vendored
View File

@ -10,6 +10,8 @@
*.userosscache *.userosscache
*.sln.docstates *.sln.docstates
.env
# User-specific files (MonoDevelop/Xamarin Studio) # User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs *.userprefs

View File

@ -1,5 +1,6 @@
module Degenz.Bot module Degenz.Bot
open System
open System.Threading.Tasks open System.Threading.Tasks
open DSharpPlus open DSharpPlus
open DSharpPlus.SlashCommands open DSharpPlus.SlashCommands
@ -10,6 +11,7 @@ open Degenz.SlotMachine
open Degenz.Trainer open Degenz.Trainer
open Degenz.HackerBattle open Degenz.HackerBattle
open Degenz.Store open Degenz.Store
open dotenv.net
type EmptyGlobalCommandToAvoidFamousDuplicateSlashCommandsBug() = inherit ApplicationCommandModule () type EmptyGlobalCommandToAvoidFamousDuplicateSlashCommandsBug() = inherit ApplicationCommandModule ()
@ -26,11 +28,15 @@ for conf in configs do
conf.TokenType <- TokenType.Bot conf.TokenType <- TokenType.Bot
conf.Intents <- DiscordIntents.All conf.Intents <- DiscordIntents.All
playerInteractionsConfig.Token <- "OTIyNDIyMDIyMTI1MDEwOTU1.YcBOcw.JxfW1CSIwEO7j6RbRFCnPZ-HoTk"
trainerConfig.Token <- "OTMzMDg4MTQyNDM5ODk5MTg4.YeccDQ.AbysjlHICgbNQVyduG6aGIHNpdE" //DotEnv.Load(DotEnvOptions(probeForEnv = true, probeLevelsToSearch = 4))
hackerBattleConfig.Token <- "OTMyMzI5NDAzNjYzNDEzMjQ4.YeRZaw.ZyCo5L8HFsCvx8JuhdAwqrH3hZI" DotEnv.Load(DotEnvOptions(probeForEnv = true, probeLevelsToSearch = 5, overwriteExistingVars = false))
storeConfig.Token <- "OTMyMzA3NTE0ODc4NDg4NjY2.YeRFCA.3NXX4tLObXU3rVgPt8D1fE58FnY"
slotMachineConfig.Token <- "OTMyMzQ3NzQ1NDE3NzE1ODE0.YeRqgA.PHandjk0jQGIxlM8NlqKc7cJD3s" playerInteractionsConfig.Token <- Environment.GetEnvironmentVariable("BOT_PLAYER_INTERACTIONS")
trainerConfig.Token <- Environment.GetEnvironmentVariable("BOT_TRAINER")
hackerBattleConfig.Token <- Environment.GetEnvironmentVariable("BOT_HACKER_BATTLE")
storeConfig.Token <- Environment.GetEnvironmentVariable("BOT_STORE")
slotMachineConfig.Token <- Environment.GetEnvironmentVariable("BOT_SLOT_MACHINE")
//config.MinimumLogLevel <- Microsoft.Extensions.Logging.LogLevel.Trace //config.MinimumLogLevel <- Microsoft.Extensions.Logging.LogLevel.Trace

View File

@ -7,9 +7,7 @@
<RootNamespace>PlayerRegistration</RootNamespace> <RootNamespace>PlayerRegistration</RootNamespace>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Content Include=".dockerignore" />
<Content Include="paket.references" /> <Content Include="paket.references" />
<Content Include="Dockerfile" />
<Compile Include="Store.fs" /> <Compile Include="Store.fs" />
<Compile Include="HackerBattle.fs" /> <Compile Include="HackerBattle.fs" />
<Compile Include="SlotMachine.fs" /> <Compile Include="SlotMachine.fs" />

View File

@ -1,7 +1,4 @@
FSharp.Core FSharp.Core
DSharpPlus DSharpPlus
// DSharpPlus.CommandsNext
// DSharpPlus.Interactivity
DSharpPlus.SlashCommands DSharpPlus.SlashCommands
dotenv.net
// MongoDB.Driver

View File

@ -11,3 +11,5 @@ nuget DSharpPlus >= 4.2.0-nightly-01054
nuget DSharpPlus.SlashCommands >= 4.2.0-nightly-01061 nuget DSharpPlus.SlashCommands >= 4.2.0-nightly-01061
nuget MongoDB.Driver nuget MongoDB.Driver
nuget dotenv.net 3.1.1

View File

@ -5,6 +5,8 @@ NUGET
DnsClient (1.5) DnsClient (1.5)
Microsoft.Win32.Registry (>= 5.0) Microsoft.Win32.Registry (>= 5.0)
System.Buffers (>= 4.5.1) - restriction: || (&& (== net6.0) (>= net471)) (&& (== net6.0) (< netstandard2.0)) (&& (== net6.0) (< netstandard2.1)) (== netstandard2.0) (&& (== netstandard2.1) (>= net471)) (&& (== netstandard2.1) (< netstandard2.0)) System.Buffers (>= 4.5.1) - restriction: || (&& (== net6.0) (>= net471)) (&& (== net6.0) (< netstandard2.0)) (&& (== net6.0) (< netstandard2.1)) (== netstandard2.0) (&& (== netstandard2.1) (>= net471)) (&& (== netstandard2.1) (< netstandard2.0))
dotenv.net (3.1.1)
System.Memory (>= 4.5.4) - restriction: || (&& (== net6.0) (< netstandard2.0)) (&& (== net6.0) (< netstandard2.1)) (== netstandard2.0) (&& (== netstandard2.1) (< netstandard2.0))
Emzi0767.Common (2.6.2) Emzi0767.Common (2.6.2)
System.Collections.Immutable (>= 5.0) System.Collections.Immutable (>= 5.0)
System.Memory (>= 4.5.4) System.Memory (>= 4.5.4)
@ -289,7 +291,7 @@ NUGET
System.Threading (>= 4.3) System.Threading (>= 4.3)
System.Threading.Tasks (>= 4.3) System.Threading.Tasks (>= 4.3)
System.Threading.Timer (>= 4.3) System.Threading.Timer (>= 4.3)
System.Numerics.Vectors (4.5) - restriction: || (&& (== net6.0) (< netcoreapp2.0)) (== netstandard2.0) (== netstandard2.1) System.Numerics.Vectors (4.5) - restriction: || (&& (== net6.0) (< netcoreapp2.0) (< netstandard2.1)) (&& (== net6.0) (< netstandard2.0)) (== netstandard2.0) (&& (== netstandard2.1) (< netstandard2.0))
System.Reflection (4.3) System.Reflection (4.3)
Microsoft.NETCore.Platforms (>= 1.1) Microsoft.NETCore.Platforms (>= 1.1)
Microsoft.NETCore.Targets (>= 1.1) Microsoft.NETCore.Targets (>= 1.1)