github.com/tada-team/tdproto@v1.51.57/server_warning.go (about)

     1  package tdproto
     2  
     3  func NewServerWarning(message, orig string) (r ServerWarning) {
     4  	r.Name = r.GetName()
     5  	r.Params.Message = message
     6  	r.Params.Orig = orig
     7  	return r
     8  }
     9  
    10  // Something went wrong with client message
    11  type ServerWarning struct {
    12  	BaseEvent
    13  	Params serverWarningParams `json:"params"`
    14  }
    15  
    16  func (p ServerWarning) GetName() string { return "server.warning" }
    17  
    18  // Params of the server.warning event
    19  type serverWarningParams struct {
    20  	// Message
    21  	Message string `json:"message"`
    22  
    23  	// Debug information
    24  	Orig interface{} `json:"orig"`
    25  }