Sha256: b9de5738e6823fe4a4e7959f98b57798200e30036b6cf0c893e1ea2765e94e1a
Contents?: true
Size: 1.17 KB
Versions: 9
Compression:
Stored size: 1.17 KB
Contents
module Telegram module Bot module Types class Message < Base attr_accessor :chat attribute :message_id, Integer attribute :from, User attribute :date, Integer attribute :forward_from, User attribute :forward_date, Integer attribute :reply_to_message, Message attribute :text, String attribute :audio, Audio attribute :document, Document attribute :photo, Array[PhotoSize] attribute :sticker, Sticker attribute :video, Video attribute :voice, Voice attribute :caption, String attribute :contact, Contact attribute :location, Location attribute :new_chat_participant, User attribute :left_chat_participant, User attribute :new_chat_title, String attribute :new_chat_photo, Array[PhotoSize] attribute :delete_chat_photo, Boolean attribute :group_chat_created, Boolean def chat=(value) @chat = if value.key?('first_name') User.new(value) elsif value.key?('title') GroupChat.new(value) end end end end end end
Version data entries
9 entries across 9 versions & 1 rubygems