Skip to main content

messages.getReplies

Get messages in a reply thread

func (c *Client) MessagesGetReplies(ctx context.Context, request *MessagesGetRepliesRequest) (MessagesMessagesClass, error)

Calling this method

client.Run(ctx, func(ctx context.Context) error {
api := client.API()

res, err := api.MessagesGetReplies(ctx, &tg.MessagesGetRepliesRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // MessagesMessagesClass
return nil
})

Parameters

NameTypeRequiredDescription
PeerInputPeerClassyesPeer
MsgIDintyesMessage ID
OffsetIDintyesOffsets for pagination, for more info click here
OffsetDateintyesOffsets for pagination, for more info click here
AddOffsetintyesOffsets for pagination, for more info click here
LimitintyesMaximum number of results to return, see pagination
MaxIDintyesIf a positive value was transferred, the method will return only messages with ID smaller than max_id
MinIDintyesIf a positive value was transferred, the method will return only messages with ID bigger than min_id
Hashint64yesHash used for caching, for more info click here

Returns

MessagesMessagesClass

Possible errors

CodeTypeDescription
400CHANNEL_INVALIDThe provided channel is invalid.
400CHANNEL_PRIVATEYou haven't joined this channel/supergroup.
400MSG_ID_INVALIDInvalid message ID provided.
400PEER_ID_INVALIDThe provided peer id is invalid.
400TOPIC_ID_INVALIDThe specified topic ID is invalid.

References