Class: Telegrambot::Types::Message
- Defined in:
- lib/telegrambot/types/message.rb
Instance Method Summary collapse
Methods inherited from Base
Instance Method Details
#arguments ⇒ String
47 48 49 50 51 |
# File 'lib/telegrambot/types/message.rb', line 47 def arguments if command? text.gsub(command, '').strip end end |
#command ⇒ String
40 41 42 43 44 |
# File 'lib/telegrambot/types/message.rb', line 40 def command if command? text.slice(entities.first.offset, entities.first.length) end end |
#command? ⇒ Boolean
35 36 37 |
# File 'lib/telegrambot/types/message.rb', line 35 def command? entities.first.type == "bot_command" end |