ba0f3 / telebot.nim

Async Telegram Bot API Client implement in @Nim-Lang
MIT License
165 stars 24 forks source link

Fix crash when parsing command at end of message #17

Closed zedeus closed 6 years ago

zedeus commented 6 years ago

When parsing a message like the following: nim can target C/C++/JS or . /start Nim spits out an exception:

Exception message: value out of range: -18
Exception type: [RangeError]

For some reason, Telegram allows commands anywhere in a message after a non-alphanumeric character, but the offset isn't taken into consideration.