require "json" require "./user.cr" require "./chat.cr" require "./message_entity.cr" require "./audio.cr" require "./document.cr" require "./photo_size.cr" require "./video.cr" require "./voice.cr" require "./video_note.cr" require "./contact.cr" require "./location.cr" require "./venue.cr" module Telepathy class Message JSON.mapping( message_id: Int64, from: User?, date: Int64, chat: Chat, forward_from: User?, forward_from_chat: Chat?, forward_from_message_id: Int64?, forward_signature: String?, forward_date: Int64?, reply_to_message: Message?, edit_date: Int64?, media_group_id: String?, author_signature: String?, text: String?, entities: Array(MessageEntity)?, caption_entities: Array(MessageEntity)?, audio: Audio?, document: Document?, photo: Array(PhotoSize)?, video: Video?, voice: Voice?, video_note: VideoNote?, # TODO game # TODO sticker caption: String?, contact: Contact?, location: Location?, venue: Venue?, new_chat_members: Array(User)?, left_chat_member: User?, new_chat_title: String?, # new_chat_photo delete_chat_photo: Bool?, group_chat_created: Bool?, supergroup_chat_created: Bool?, channel_chat_created: Bool?, migrate_to_chat_id: Int64?, migrate_from_chat_id: Int64?, pinned_message: Message? # invoice # successful_payment ) end end