diff --git a/app/controllers/telegram/webhook_controller.rb b/app/controllers/telegram/webhook_controller.rb index 8ec7c46..f200659 100644 --- a/app/controllers/telegram/webhook_controller.rb +++ b/app/controllers/telegram/webhook_controller.rb @@ -6,6 +6,12 @@ module Telegram class WebhookController < Telegram::Bot::UpdatesController include Telegram::Bot::UpdatesController::TypedUpdate + MESSAGES = %w[aha what hi haha].freeze + + def message(_) + respond_with :message, text: t('.' + MESSAGES.sample) + end + # Recibe un token, lo busca y asocia las cuentas def start!(token = nil) unless token diff --git a/config/locales/en.yml b/config/locales/en.yml index 484b9cf..fbe96d8 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -52,3 +52,8 @@ en: need_token: 'To be able to link your Lumi and Telegram accounts, you can go to Lumi and find a link to Telegram. Once you open it I can link them P)' couldnt_find: "I couldn't find you, did you use the correct link?" hi: "Hi %{pirata}! I linked your accounts, from now on I'll contact you whenever there's news" + message: + aha: 'Aha... how curious' + what: '¬¬' + hi: 'Hi!' + haha: 'haha' diff --git a/config/locales/es.yml b/config/locales/es.yml index 9366598..53575bb 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -58,3 +58,9 @@ es: need_token: 'Para poder asociar tus cuentas entre Lumi y Telegram, podés ir a Lumi y buscar el vínculo a Telegram. Al abrirlo se asocian las cuentas P)' couldnt_find: 'No te encuentro, ¿usaste el vínculo correcto?' hi: '¡Hola %{pirata}! Ya asocié tus cuentas de Lumi y Telegram, a partir de ahora te voy a contactar con las actualizaciones P)' + message: + aha: 'Ajá, mirá vos...' + what: '¬¬' + hi: '¡Hola!' + haha: 'jaja' +