github.com/tada-team/tdproto@v1.51.57/server_chat_deleted.go (about) 1 package tdproto 2 3 func NewServerChatDeleted(chat DeletedChat, teamUnread *TeamUnread, badge uint) (r ServerChatDeleted) { 4 chat.IsArchive = true 5 chat.Gentime = Gentime() 6 7 r.Name = r.GetName() 8 r.Params.Chats = []DeletedChat{chat} 9 r.Params.TeamUnread = teamUnread 10 r.Params.Badge = badge 11 return r 12 } 13 14 // Chat deleted 15 type ServerChatDeleted struct { 16 BaseEvent 17 Params serverChatDeletedParams `json:"params"` 18 } 19 20 func (p ServerChatDeleted) GetName() string { return "server.chat.deleted" } 21 22 // Params of the server.chat.deleted event 23 type serverChatDeletedParams struct { 24 // List of deleted chats 25 Chats []DeletedChat `json:"chats"` 26 27 // Current team counters 28 TeamUnread *TeamUnread `json:"team_unread"` 29 30 // Total number of unreads 31 Badge uint `json:"badge"` 32 }