1
0
Fork 0

Added NewInlineMention helper

This commit is contained in:
Maxim Lebedev 2018-01-29 14:06:40 +05:00
parent 6028dbc557
commit 163bae541d
No known key found for this signature in database
GPG Key ID: F8978F46FF0FFA4F
1 changed files with 19 additions and 0 deletions

View File

@ -1,8 +1,27 @@
package telegram
import (
"fmt"
"net/url"
"strconv"
)
func NewForceReply(selective bool) *ForceReply {
return &ForceReply{
ForceReply: true,
Selective: selective,
}
}
func NewInlineMentionURL(id int) *url.URL {
link := &url.URL{
Scheme: "tg",
Path: "user",
}
q := link.Query()
q.Add("id", strconv.Itoa(id))
link.RawQuery = q.Encode()
return link
}