tucnak / telebot

Telebot is a Telegram bot framework in Go.
MIT License
4.04k stars 469 forks source link

context: improve message args parsing #651

Closed 70sh1 closed 8 months ago

70sh1 commented 9 months ago

This is achieved by using strings.Fields instead of strings.Split

This results in a cleaner output when parsing messages like /tags a lot of spaces

Output before: []string{"a", "", "", "", "", "", "", "", "", "", "lot", "", "", "", "", "", "", "", "", "of", "", "", "", "", "", "", "", "spaces"}

Output after the change: []string{"a", "lot", "of", "spaces"}