Responder con algo

This commit is contained in:
fauno 2020-06-20 22:02:54 -03:00
parent 12c3cb7436
commit fde7002cc9
3 changed files with 17 additions and 0 deletions

View file

@ -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

View file

@ -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'

View file

@ -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'