Update Program.cs

This commit is contained in:
raym55 2022-06-20 06:36:02 +01:00
parent 22a8e91f85
commit 075fbd1bb4
1 changed files with 9 additions and 0 deletions

View File

@ -456,6 +456,15 @@ CommandHandler.RegisterCommand("loadsettings", _ => {
return "Loaded settings.json";
});
async CommandHandler.RegisterCommand("reconnect", _ => {
// this should be async'ed but i'm lazy
await bot.DisconnectAsync();
Task.Delay(2500);
await bot.ConnectAsync();
Task.Delay(1000);
return "reconnected successful";
});
Console.CancelKeyPress += (_, e) => {
e.Cancel = true;
consoleLogger.Info("Received Ctrl+C");