Skip to content
This repository has been archived by the owner on Sep 14, 2023. It is now read-only.

Bot crashes when typing @BotName in Telegram #27

Open
daniel-stockhausen opened this issue Mar 28, 2016 · 2 comments
Open

Bot crashes when typing @BotName in Telegram #27

daniel-stockhausen opened this issue Mar 28, 2016 · 2 comments

Comments

@daniel-stockhausen
Copy link

If you type @gif for example it shows you some popular gifs. If you type @yourBotName the gem crashes because it seems to receive a nil-Message?

@eljojo
Copy link
Owner

eljojo commented Mar 29, 2016

Can you post a code example?

On 28 Mar 2016, at 08:56, Daniel Stockhausen [email protected] wrote:

If you type @gif for example it shows you some popular gifs. If you type @yourBotName the gem crashes because it seems to receive a nil-Message?


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub

@bamorim
Copy link

bamorim commented Apr 7, 2016

@daniel-stockhausen One way to fix without touching the library is just checking message for nil, however, what I think is more appropriate is to add .compact to the line https://github.com/eljojo/telegram_bot/blob/master/lib/telegram_bot/bot.rb#L68 so it drops nil messages.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants