Module: TelegramBot::ShorthandMethods

Included in:
MessageProxy
Defined in:
lib/telegram_bot/shorthand_methods.rb

Instance Method Summary collapse

Instance Method Details

#forward_message(to) ⇒ Object



10
11
12
# File 'lib/telegram_bot/shorthand_methods.rb', line 10

def forward_message(to)
  bot.forward_message(message, to)
end

#reply(text, *args, to: message.chat, **opts) ⇒ Object



6
7
8
# File 'lib/telegram_bot/shorthand_methods.rb', line 6

def reply(text, *args, to: message.chat, **opts)
  bot.send_message(to, text, *args, reply_to: message, **opts)
end

#send_chat_action(action) ⇒ Object



14
15
16
# File 'lib/telegram_bot/shorthand_methods.rb', line 14

def send_chat_action(action)
  bot.send_chat_action(message.chat, action)
end

#send_message(text, *args, to: message.chat, **opts) ⇒ Object



2
3
4
# File 'lib/telegram_bot/shorthand_methods.rb', line 2

def send_message(text, *args, to: message.chat, **opts)
  bot.send_message(to, text, *args, **opts)
end