Handle all commands
This commit is contained in:
parent
e39803e8f9
commit
1b62ef11ec
1 changed files with 4 additions and 10 deletions
|
@ -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,
|
||||||
|
|
Reference in a new issue