1
0
Fork 0

Added some InlineQuery utils

This commit is contained in:
Maxim Lebedev 2018-09-05 16:47:53 +05:00
parent 4131980f6a
commit 93a6cdfaf8
No known key found for this signature in database
GPG Key ID: F8978F46FF0FFA4F
1 changed files with 11 additions and 0 deletions

View File

@ -1,5 +1,16 @@
package telegram
// HasLocation checks what current InlineQuery has Location info.
func (iq *InlineQuery) HasLocation() bool {
return iq != nil && iq.Location != nil
}
// HasOffset checks what current InlineQuery has Offset.
func (iq *InlineQuery) HasOffset() bool {
return iq != nil && iq.Offset != ""
}
// HasQuery checks what current InlineQuery has Query string.
func (iq *InlineQuery) HasQuery() bool {
return iq != nil && iq.Query != ""
}