Closed Gregory280 closed 2 years ago
Hi @Gregory280
There is no method #text
for ChatMemberUpdated. If you don't need any special behavior for this type of update, you can just remove it from case statement:
Telegram::Bot::Client.run(token) do |bot|
bot.listen do |message|
case message
when Telegram::Bot::Types::Message
case message.text
when '/start'
# Respond to `/start` message
end
end
end
end
My bad. Thanks! Please delete this issue xD
My bot was working fine when I add the different types of message for normal message chat and group message.
In the group test that I created and add the bot was working fine. After I add the bot to a group that I dont own, the bot shows in the contacts group but has no access to the messages. I think the owner have to give permission to the bot (am I wrong?). And now my script is broken returning this error:
Its strange because this NoMethodError for Telegram::Bot::Types::ChatMemberUpdated occured when I didnt have the add the code for type message for ChatMemberUpdated seen is this issue There is code missing for handling this kind of situation in my script? Or there a way handle error like this so the bot wont broken when this happens again? my repo