Fixed some text and added some missing texts to commands. Added new command to clear screen and formated code.

This commit is contained in:
2023-07-03 14:39:50 +03:00
parent 4a6a12baae
commit 298e557260
36 changed files with 1503 additions and 1542 deletions

View File

@@ -8,15 +8,16 @@ namespace DiscordBot.Bot.Actions;
public class Exit : ICommandAction
{
public string ActionName => "exit";
public string Description => "Exits the bot and saves the config. Use exit help for more info.";
public string Usage => "exit [help|force]";
public InternalActionRunType RunType => InternalActionRunType.ON_CALL;
public string ActionName => "exit";
public string Description => "Exits the bot and saves the config. Use exit help for more info.";
public string Usage => "exit [help|force]";
public InternalActionRunType RunType => InternalActionRunType.ON_CALL;
public async Task Execute(string[] args)
{
if (args is null || args.Length == 0)
{
Config.Logger.Log("Exiting...", "Exit", LogLevel.INFO);
Config.Logger.Log("Exiting...", "Exit");
Config.Data.Save();
Environment.Exit(0);
}
@@ -29,12 +30,12 @@ public class Exit : ICommandAction
Console.WriteLine("help : Displays this message");
Console.WriteLine("force : Exits the bot without saving the config");
break;
case "force":
Config.Logger.Log("Exiting...", "Exit", LogLevel.INFO);
Config.Logger.Log("Exiting...", "Exit");
Environment.Exit(0);
break;
default:
Console.WriteLine("Invalid argument !");
break;