Reformatting code
This commit is contained in:
@@ -7,7 +7,7 @@ using PluginManager.Others;
|
||||
|
||||
namespace DiscordBot.Bot.Actions;
|
||||
|
||||
public class SettingsConfig : ICommandAction
|
||||
public class SettingsConfig: ICommandAction
|
||||
{
|
||||
public string ActionName => "config";
|
||||
public string Description => "Change the settings of the bot";
|
||||
@@ -19,7 +19,7 @@ public class SettingsConfig : ICommandAction
|
||||
{
|
||||
foreach (var settings in Config.AppSettings)
|
||||
Console.WriteLine(settings.Key + ": " + settings.Value);
|
||||
|
||||
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
@@ -27,25 +27,25 @@ public class SettingsConfig : ICommandAction
|
||||
{
|
||||
case "-s":
|
||||
case "set":
|
||||
if(args.Length < 3)
|
||||
if (args.Length < 3)
|
||||
return Task.CompletedTask;
|
||||
SettingsConfigExtra.SetSettings(args[1],args[2..]);
|
||||
SettingsConfigExtra.SetSettings(args[1], args[2..]);
|
||||
break;
|
||||
|
||||
|
||||
case "-r":
|
||||
case "remove":
|
||||
if(args.Length < 2)
|
||||
if (args.Length < 2)
|
||||
return Task.CompletedTask;
|
||||
SettingsConfigExtra.RemoveSettings(args[1]);
|
||||
break;
|
||||
|
||||
|
||||
case "-a":
|
||||
case "add":
|
||||
if(args.Length < 3)
|
||||
if (args.Length < 3)
|
||||
return Task.CompletedTask;
|
||||
SettingsConfigExtra.AddSettings(args[1], args[2..]);
|
||||
break;
|
||||
|
||||
|
||||
case "-h":
|
||||
case "-help":
|
||||
Console.WriteLine("Options:");
|
||||
@@ -54,14 +54,14 @@ public class SettingsConfig : ICommandAction
|
||||
Console.WriteLine("-a <settingName> <newValue>: Add a setting");
|
||||
Console.WriteLine("-h: Show this help message");
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
Console.WriteLine("Invalid option");
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user