public void StopBot() { lock (_botLock) { if (Bot == null) { return; } Bot.Stop(); Bot = null; } }
public void StartBot() { lock (_botLock) { if (Bot != null) { return; } Bot = new TorchCqBridgeBot( Torch.CurrentSession.Managers.GetManager <IChatManagerServer>(), Config.Address, Config.AccessToken, Config.GroupId, Config.RemoveCqCode, Config.IgnoreEmptyMessage, Config.QqChatAuthorFormat, Config.QqChatMessageFormat, Config.GameChatFormat ); Bot.Start(); } }