0
0
Fork 0
mirror of https://github.com/Sanae6/SmoOnlineServer.git synced 2024-11-25 12:45:18 +00:00

Update Program.cs

This commit is contained in:
raym55 2022-06-20 06:36:02 +01:00
parent 22a8e91f85
commit 075fbd1bb4

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");