✨ Added NewInlineMention helper
This commit is contained in:
parent
6028dbc557
commit
163bae541d
19
helpers.go
19
helpers.go
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue