private static async Task CreateBot(string botName) {
if (string.IsNullOrEmpty(botName)) {
ArchiLogger.LogNullError(nameof(botName));
return;
}
if (Bot.Bots.ContainsKey(botName)) {
return;
}
// It's entirely possible that some process is still accessing our file, allow at least a second before trying to read it
await Task.Delay(1000).ConfigureAwait(false);
if (Bot.Bots.ContainsKey(botName)) {
return;
}
new Bot(botName).Forget();
}