Class: Telbe::Message

Inherits:
Object
  • Object
show all
Includes:
SimplifyApi
Defined in:
lib/telbe/bot.rb,
lib/telbe/chat.rb,
lib/telbe/keyboard.rb

Overview

Dummy

Instance Method Summary collapse

Instance Method Details

#get_command_for(bot) ⇒ Object



176
177
178
# File 'lib/telbe/bot.rb', line 176

def get_command_for(bot)
  text && text.sub(Regexp.new("@#{bot.get_me.username}($|\s|\.|,)", Regexp::IGNORECASE), '').strip
end

#reply {|reply| ... } ⇒ Object

attribute :passport_data, PassportData

Yields:



170
171
172
173
174
# File 'lib/telbe/bot.rb', line 170

def reply(&block)
  reply = MessageDescriptor.new(chat_id: chat.id)
  yield reply if block_given?
  reply
end