Responder con algo
This commit is contained in:
parent
12c3cb7436
commit
fde7002cc9
3 changed files with 17 additions and 0 deletions
|
@ -6,6 +6,12 @@ module Telegram
|
||||||
class WebhookController < Telegram::Bot::UpdatesController
|
class WebhookController < Telegram::Bot::UpdatesController
|
||||||
include Telegram::Bot::UpdatesController::TypedUpdate
|
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
|
# Recibe un token, lo busca y asocia las cuentas
|
||||||
def start!(token = nil)
|
def start!(token = nil)
|
||||||
unless token
|
unless token
|
||||||
|
|
|
@ -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)'
|
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?"
|
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"
|
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'
|
||||||
|
|
|
@ -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)'
|
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?'
|
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)'
|
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'
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue