mirror of
https://github.com/Sanae6/SmoOnlineServer.git
synced 2024-11-25 04:35:18 +00:00
Update Program.cs
This commit is contained in:
parent
22a8e91f85
commit
075fbd1bb4
1 changed files with 9 additions and 0 deletions
|
@ -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");
|
||||
|
|
Loading…
Reference in a new issue