1
0
Fork 0

Handle all commands

This commit is contained in:
Alex Kotov 2018-12-08 03:05:11 +05:00
parent e39803e8f9
commit 1b62ef11ec
No known key found for this signature in database
GPG key ID: 4E831250F47DE154

View file

@ -33,16 +33,10 @@ private
return if @telegram_bot.username.nil? return if @telegram_bot.username.nil?
expected = case telegram_chat.chat_type return unless message[:text].in? [
when 'private' '/shrug',
'/shrug' "/shrug@#{@telegram_bot.username}",
when 'group', 'supergroup' ]
"/shrug@#{@telegram_bot.username}"
else
return
end
return unless message[:text] == expected
@telegram_bot.client.send_message( @telegram_bot.client.send_message(
chat_id: telegram_chat.remote_id, chat_id: telegram_chat.remote_id,