From cfe6c3eecfcd3e2e63b5b9a3854eb0d990ec9ce0 Mon Sep 17 00:00:00 2001 From: TheUbMunster Date: Tue, 11 Jul 2023 05:04:54 -0600 Subject: [PATCH] but actually now --- README.md | 2 +- Server/DiscordBot.cs | 3 +++ Server/Server.csproj | 1 - 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2f13ae8..89c2b5c 100644 --- a/README.md +++ b/README.md @@ -82,7 +82,7 @@ Banlist: banned people are unable to join the server, default: false PersistShines/Moons: Allows the server to remember moon progress across crashes/restarts ### Discord -Note: Token, LogChannel and CommandChannel need to have quotes "" around it +Note: Token, AdminChannel (formerly known as "LogChannel") and CommandChannel need to have quotes "" around it Token: the token of the bot you want to load into, default: null Prefix: the bot prefix to be used, default: $ CommandChannel: allows discord commands, default: null diff --git a/Server/DiscordBot.cs b/Server/DiscordBot.cs index 4109249..89d274a 100644 --- a/Server/DiscordBot.cs +++ b/Server/DiscordBot.cs @@ -37,6 +37,9 @@ public class DiscordBot Logger.AddLogHandler(LogToDiscordLogChannel); } + //this nonsense is to prevent race conditions from starting multiple bots. + //this would be a great thing to instead simply have an "await Init()" put + //in the ctor (but awaits can't be there), and Task.Wait shouldn't be used that way. private object firstInitLockObj = new object(); public async Task FirstInit() { diff --git a/Server/Server.csproj b/Server/Server.csproj index 6608e67..166bc50 100644 --- a/Server/Server.csproj +++ b/Server/Server.csproj @@ -13,7 +13,6 @@ -