buscar en el mensaje correcto
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
parent
815e219eb8
commit
ef658e4641
1 changed files with 1 additions and 1 deletions
2
main.go
2
main.go
|
@ -59,7 +59,7 @@ func (config Config) handleMessage(bot *tgbotapi.BotAPI, update tgbotapi.Update)
|
|||
}
|
||||
|
||||
// ugh https://github.com/go-telegram-bot-api/telegram-bot-api/issues/231
|
||||
text := update.Message.Text
|
||||
text := searchMsg.Text
|
||||
utfEncodedString := utf16.Encode([]rune(text))
|
||||
runeString := utf16.Decode(utfEncodedString[e.Offset : e.Offset+e.Length])
|
||||
text = string(runeString)
|
||||
|
|
Reference in a new issue