Updates channel removed from BotAPI
This commit is contained in:
parent
6da34a6ba5
commit
2a5cf8652d
3 changed files with 19 additions and 16 deletions
6
types.go
6
types.go
|
@ -4,6 +4,7 @@ import (
|
|||
"encoding/json"
|
||||
"fmt"
|
||||
"time"
|
||||
"strings"
|
||||
)
|
||||
|
||||
// APIResponse is a response from the Telegram API with the result stored raw.
|
||||
|
@ -112,11 +113,14 @@ func (m *Message) IsGroup() bool {
|
|||
return m.From.ID != m.Chat.ID
|
||||
}
|
||||
|
||||
// IsGroup returns if the message was sent to a group.
|
||||
func (m *Message) IsCommand() bool {
|
||||
return m.Text != "" && m.Text[0] == '/'
|
||||
}
|
||||
|
||||
func (m *Message) Command() string {
|
||||
return strings.Split(m.Text, " ")[0]
|
||||
}
|
||||
|
||||
// PhotoSize contains information about photos, including ID and Width and Height.
|
||||
type PhotoSize struct {
|
||||
FileID string `json:"file_id"`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue