Update Program.cs
This commit is contained in:
parent
22a8e91f85
commit
075fbd1bb4
|
@ -456,6 +456,15 @@ CommandHandler.RegisterCommand("loadsettings", _ => {
|
||||||
return "Loaded settings.json";
|
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) => {
|
Console.CancelKeyPress += (_, e) => {
|
||||||
e.Cancel = true;
|
e.Cancel = true;
|
||||||
consoleLogger.Info("Received Ctrl+C");
|
consoleLogger.Info("Received Ctrl+C");
|
||||||
|
|
Loading…
Reference in New Issue