github.com/tada-team/tdproto@v1.51.57/server_team_counters.go (about) 1 package tdproto 2 3 // TODO: remove empty 4 func NewServerTeamCounters(counters []TeamCounter, badge uint) ServerTeamCounters { 5 r := ServerTeamCounters{} 6 r.Name = r.GetName() 7 r.Params.Teams = counters 8 r.Params.Badge = badge 9 return r 10 } 11 12 // Counters form other teams 13 type ServerTeamCounters struct { 14 BaseEvent 15 Params serverTeamCountersParams `json:"params"` 16 } 17 18 func (p ServerTeamCounters) GetName() string { return "server.team.counters" } 19 20 // Params of the server.team.counters event 21 type serverTeamCountersParams struct { 22 // Counters 23 Teams []TeamCounter `json:"teams"` 24 25 // Total number of unreads 26 Badge uint `json:"badge"` 27 }