Skip to main content

messages.getScheduledHistory

Get scheduled messages

func (c *Client) MessagesGetScheduledHistory(ctx context.Context, request *MessagesGetScheduledHistoryRequest) (MessagesMessagesClass, error)

Calling this method

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

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

Parameters

NameTypeRequiredDescription
PeerInputPeerClassyesPeer
Hashint64yesHash used for caching, for more info click here. To generate the hash, populate the ids array with the id, edit_date (0 if unedited) and date (in this order) of the previously returned messages (in order, i.e. ids = [id1, (edit_date1 ?? 0), date1, id2 (edit_date2 ?? 0), date2, ...]).

Returns

MessagesMessagesClass

Possible errors

CodeTypeDescription
400CHAT_ADMIN_REQUIREDYou must be an admin in this chat to do this.
400PEER_ID_INVALIDThe provided peer id is invalid.

References