Formatted code and rebuilt PluginLoader
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
using System;
|
||||
using PluginManager;
|
||||
using Spectre.Console;
|
||||
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DiscordBot;
|
||||
@@ -10,10 +9,10 @@ public static class Installer
|
||||
{
|
||||
public static async Task GenerateStartupConfig()
|
||||
{
|
||||
string token = await PluginManager.UX.UxHandler.ShowInputBox("SethBot", "Please enter the bot token:");
|
||||
string botPrefix = await PluginManager.UX.UxHandler.ShowInputBox("SethBot", "Please enter the bot prefix:");
|
||||
string serverId = await PluginManager.UX.UxHandler.ShowInputBox("SethBot", "Please enter the Server ID:");
|
||||
|
||||
var token = await PluginManager.UX.UxHandler.ShowInputBox("SethBot", "Please enter the bot token:");
|
||||
var botPrefix = await PluginManager.UX.UxHandler.ShowInputBox("SethBot", "Please enter the bot prefix:");
|
||||
var serverId = await PluginManager.UX.UxHandler.ShowInputBox("SethBot", "Please enter the Server ID:");
|
||||
|
||||
if (string.IsNullOrWhiteSpace(serverId)) serverId = "NULL";
|
||||
|
||||
if (string.IsNullOrWhiteSpace(token) || string.IsNullOrWhiteSpace(botPrefix))
|
||||
@@ -21,13 +20,13 @@ public static class Installer
|
||||
await PluginManager.UX.UxHandler.ShowMessageBox("SethBot", "Invalid token or prefix !", PluginManager.UX.MessageBoxType.Error);
|
||||
Environment.Exit(-20);
|
||||
}
|
||||
|
||||
|
||||
Config.AppSettings.Add("token", token);
|
||||
Config.AppSettings.Add("prefix", botPrefix);
|
||||
Config.AppSettings.Add("ServerID", serverId);
|
||||
|
||||
|
||||
await Config.AppSettings.SaveToFile();
|
||||
|
||||
Config.Logger.Log("Config Saved", source: typeof(Installer));
|
||||
|
||||
Config.Logger.Log("Config Saved", typeof(Installer));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user