/// <summary> /// Registers the given function to be run when the bot receives an error message from the server. /// </summary> /// <param name = "handler"> /// The function to register. /// </param> public void RegisterOnErrorHook(ErrorMessageEventHandler handler) { AlarisBase.Instance.Connection.Listener.OnError += handler; }
protected virtual void OnErrorMessageEventHandler(ErrorMessageEventArgs e) { ErrorMessageEventHandler?.Invoke(this, e); }
public ErrorMessageEventNotifier(ErrorMessageEventHandler eventHandler) { this._eventHandler = eventHandler; }