private static void OnDeleted(object sender, FileSystemEventArgs e) {
if ((sender == null) || (e == null)) {
ArchiLogger.LogNullError(nameof(sender) + " || " + nameof(e));
return;
}
string botName = Path.GetFileNameWithoutExtension(e.Name);
if (string.IsNullOrEmpty(botName)) {
return;
}
if (botName.Equals(SharedInfo.ASF)) {
ArchiLogger.LogGenericError("Global config file has been removed, exiting...");
Program.Exit(1);
return;
}
Bot bot;
if (Bot.Bots.TryGetValue(botName, out bot)) {
bot.OnNewConfigLoaded(new BotConfigEventArgs()).Forget();
}
}