Skip to content
This repository was archived by the owner on Apr 9, 2020. It is now read-only.

Commit fae282f

Browse files
committed
✨ Removed color sensitive for emojis in inline search
1 parent 39c3117 commit fae282f

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

inline_query.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,25 @@ package main
22

33
import (
44
"strconv"
5+
"strings"
56

67
log "github.com/kirillDanshin/dlog" // Insert logs only in debug builds
78
"github.com/toby3d/go-telegram" // My Telegram bindings
89
)
910

1011
const perPage = 50
1112

13+
var r = strings.NewReplacer(
14+
"🏻", "",
15+
"🏼", "",
16+
"🏽", "",
17+
"🏾", "",
18+
"🏿", "",
19+
)
20+
1221
func inlineQuery(inline *telegram.InlineQuery) {
22+
inline.Query = r.Replace(inline.Query)
23+
1324
log.Ln("Let's preparing answer...")
1425
T, err := switchLocale(inline.From.LanguageCode)
1526
errCheck(err)

0 commit comments

Comments
 (0)