NAME

Net::API::Telegram::Message - A message

SYNOPSIS

my $msg = Net::API::Telegram::Message->new( %data ) || 
die( Net::API::Telegram::Message->error, "\n" );

DESCRIPTION

Net::API::Telegram::Message is a Telegram Message Object as defined here https://core.telegram.org/bots/api#message

This module has been automatically generated from Telegram API documentation by the script scripts/telegram-doc2perl-methods.pl.

METHODS

new( {INIT HASH REF}, %PARAMETERS )

new() will create a new object for the package, pass any argument it might receive to the special standard routine init that must exist. Then it returns what returns init().

The valid parameters are as follow. Methods available here are also parameters to the new method.

  • verbose

  • debug

animation( Net::API::Telegram::Animation )

Optional. Message is an animation, information about the animation. For backward compatibility, when this field is set, the document field will also be set

audio( Net::API::Telegram::Audio )

Optional. Message is an audio file, information about the file

author_signature( String )

Optional. Signature of the post author for messages in channels

caption( String )

Optional. Caption for the animation, audio, document, photo, video or voice, 0-1024 characters

caption_entities( Array of MessageEntity )

Optional. For messages with a caption, special entities like usernames, URLs, bot commands, etc. that appear in the caption

channel_chat_created( True )

Optional. Service message: the channel has been created. This field can‘t be received in a message coming through updates, because bot can’t be a member of a channel when it is created. It can only be found in reply_to_message if someone replies to a very first message in a channel.

chat( Net::API::Telegram::Chat )

Conversation the message belongs to

connected_website( String )

Optional. The domain name of the website on which the user has logged in. More about Telegram Login »

contact( Net::API::Telegram::Contact )

Optional. Message is a shared contact, information about the contact

date( Date )

Date the message was sent in Unix time

delete_chat_photo( True )

Optional. Service message: the chat photo was deleted

document( Net::API::Telegram::Document )

Optional. Message is a general file, information about the file

edit_date( Date )

Optional. Date the message was last edited in Unix time

entities( Array of MessageEntity )

Optional. For text messages, special entities like usernames, URLs, bot commands, etc. that appear in the text

forward_date( Date )

Optional. For forwarded messages, date the original message was sent in Unix time

forward_from( Net::API::Telegram::User )

Optional. For forwarded messages, sender of the original message

forward_from_chat( Net::API::Telegram::Chat )

Optional. For messages forwarded from channels, information about the original channel

forward_from_message_id( Integer )

Optional. For messages forwarded from channels, identifier of the original message in the channel

forward_sender_name( String )

Optional. Sender's name for messages forwarded from users who disallow adding a link to their account in forwarded messages

forward_signature( String )

Optional. For messages forwarded from channels, signature of the post author if present

from( Net::API::Telegram::User )

Optional. Sender, empty for messages sent to channels

game( Net::API::Telegram::Game )

Optional. Message is a game, information about the game. More about games »

group_chat_created( True )

Optional. Service message: the group has been created

invoice( Net::API::Telegram::Invoice )

Optional. Message is an invoice for a payment, information about the invoice. More about payments »

left_chat_member( Net::API::Telegram::User )

Optional. A member was removed from the group, information about them (this member may be the bot itself)

location( Net::API::Telegram::Location )

Optional. Message is a shared location, information about the location

media_group_id( String )

Optional. The unique identifier of a media message group this message belongs to

message_id( Integer )

Unique message identifier inside this chat

migrate_from_chat_id( Integer )

Optional. The supergroup has been migrated from a group with the specified identifier. This number may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it is smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier.

migrate_to_chat_id( Integer )

Optional. The group has been migrated to a supergroup with the specified identifier. This number may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it is smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier.

new_chat_members( Array of User )

Optional. New members that were added to the group or supergroup and information about them (the bot itself may be one of these members)

new_chat_photo( Array of PhotoSize )

Optional. A chat photo was change to this value

new_chat_title( String )

Optional. A chat title was changed to this value

passport_data( Net::API::Telegram::PassportData )

Optional. Telegram Passport data

photo( Array of PhotoSize )

Optional. Message is a photo, available sizes of the photo

pinned_message( Net::API::Telegram::Message )

Optional. Specified message was pinned. Note that the Message object in this field will not contain further reply_to_message fields even if it is itself a reply.

poll( Net::API::Telegram::Poll )

Optional. Message is a native poll, information about the poll

reply_markup( Net::API::Telegram::InlineKeyboardMarkup )

Optional. Inline keyboard attached to the message. login_url buttons are represented as ordinary url buttons.

reply_to_message( Net::API::Telegram::Message )

Optional. For replies, the original message. Note that the Message object in this field will not contain further reply_to_message fields even if it itself is a reply.

sticker( Net::API::Telegram::Sticker )

Optional. Message is a sticker, information about the sticker

successful_payment( Net::API::Telegram::SuccessfulPayment )

Optional. Message is a service message about a successful payment, information about the payment. More about payments »

supergroup_chat_created( True )

Optional. Service message: the supergroup has been created. This field can‘t be received in a message coming through updates, because bot can’t be a member of a supergroup when it is created. It can only be found in reply_to_message if someone replies to a very first message in a directly created supergroup.

text( String )

Optional. For text messages, the actual UTF-8 text of the message, 0-4096 characters.

venue( Net::API::Telegram::Venue )

Optional. Message is a venue, information about the venue

video( Net::API::Telegram::Video )

Optional. Message is a video, information about the video

video_note( Net::API::Telegram::VideoNote )

Optional. Message is a video note, information about the video message

voice( Net::API::Telegram::Voice )

Optional. Message is a voice message, information about the file

COPYRIGHT

Copyright (c) 2000-2019 DEGUEST Pte. Ltd.

AUTHOR

Jacques Deguest <jack@deguest.jp>

SEE ALSO

Net::API::Telegram

COPYRIGHT & LICENSE

Copyright (c) 2018-2019 DEGUEST Pte. Ltd.

You can use, copy, modify and redistribute this package and associated files under the same terms as Perl itself.