forked from tucnak/telebot
-
Notifications
You must be signed in to change notification settings - Fork 1
/
voice.go
29 lines (23 loc) · 846 Bytes
/
voice.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
package telebot
import "time"
// VoiceChatStarted represents a service message about a voice chat
// started in the chat.
type VoiceChatStarted struct{}
// VoiceChatEnded represents a service message about a voice chat
// ended in the chat.
type VoiceChatEnded struct {
Duration int `json:"duration"`
}
// VoiceChatParticipantsInvited represents a service message about new
// members invited to a voice chat
type VoiceChatParticipantsInvited struct {
Users []User `json:"users"`
}
// VoiceChatScheduled represents a service message about a voice chat scheduled in the chat.
type VoiceChatScheduled struct {
Unixtime int64 `json:"start_date"`
}
// ExpireDate returns the point when the voice chat is supposed to be started by a chat administrator.
func (v *VoiceChatScheduled) ExpireDate() time.Time {
return time.Unix(v.Unixtime, 0)
}