Fixed plugin refresh command and added new method for executing tasks without return type in ConsoleUtilities

This commit is contained in:
2023-09-25 22:06:42 +03:00
parent c577f625c2
commit 89c4932cd7
8 changed files with 78 additions and 57 deletions

View File

@@ -1,4 +1,3 @@
using System;
using PluginManager;
using Spectre.Console;
@@ -8,13 +7,14 @@ public static class Installer
{
public static void GenerateStartupConfig()
{
AnsiConsole.WriteLine("Welcome to the [bold]SethBot[/] installer !");
AnsiConsole.WriteLine("First, we need to configure the bot. Don't worry, it will be quick !");
var token = AnsiConsole.Ask<string>("Please enter the bot token :");
var prefix = AnsiConsole.Ask<string>("Please enter the bot prefix :");
var serverId = AnsiConsole.Ask<string>("Please enter the Server ID :");
AnsiConsole.MarkupLine("Welcome to the [bold]SethBot[/] installer !");
AnsiConsole.MarkupLine("First, we need to configure the bot. Don't worry, it will be quick !");
var token = AnsiConsole.Ask<string>("Please enter the bot [yellow]token[/]:");
var prefix = AnsiConsole.Ask<string>("Please enter the bot [yellow]prefix[/]:");
var serverId = AnsiConsole.Ask<string>("Please enter the [yellow]Server ID[/]:");
if (string.IsNullOrWhiteSpace(serverId)) serverId = "NULL";
Config.AppSettings.Add("token", token);
Config.AppSettings.Add("prefix", prefix);
Config.AppSettings.Add("ServerID", serverId);