We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8e71d1d commit e1a0a81Copy full SHA for e1a0a81
types.go
@@ -60,6 +60,21 @@ type Chat struct {
60
LastName string `json:"last_name"`
61
}
62
63
+// IsPrivate returns true if the Chat is a private conversation
64
+func (c *Chat) IsPrivate() bool {
65
+ return c.Type == "private"
66
+}
67
+
68
+// IsGroup returns true if the Chat is a group conversation
69
+func (c *Chat) IsGroup() bool {
70
+ return c.Type == "group"
71
72
73
+// IsChannel returns true if the Chat is a channel
74
+func (c *Chat) IsChannel() bool {
75
+ return c.Type == "channel"
76
77
78
// Message is returned by almost every request, and contains data about almost anything.
79
type Message struct {
80
MessageID int `json:"message_id"`
0 commit comments