Lint issues fixed
This commit is contained in:
parent
d638757359
commit
4037dbed02
3 changed files with 63 additions and 8 deletions
2
types.go
2
types.go
|
@ -113,10 +113,12 @@ func (m *Message) IsGroup() bool {
|
|||
return m.From.ID != m.Chat.ID
|
||||
}
|
||||
|
||||
// IsCommand returns true if message starts from /
|
||||
func (m *Message) IsCommand() bool {
|
||||
return m.Text != "" && m.Text[0] == '/'
|
||||
}
|
||||
|
||||
// Command returns first word from message
|
||||
func (m *Message) Command() string {
|
||||
return strings.Split(m.Text, " ")[0]
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue