Skip to main content

messages.getPeerSettings

Get peer settings

func (c *Client) MessagesGetPeerSettings(ctx context.Context, peer InputPeerClass) (*MessagesPeerSettings, error)

Calling this method

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

res, err := api.MessagesGetPeerSettings(ctx, peer)
if err != nil {
return err
}
_ = res // *MessagesPeerSettings
return nil
})

Parameters

NameTypeRequiredDescription
PeerInputPeerClassyesThe peer

Returns

*MessagesPeerSettings

Possible errors

CodeTypeDescription
400CHANNEL_INVALIDThe provided channel is invalid.
400CHANNEL_MONOFORUM_UNSUPPORTEDMonoforums do not support this feature.
400CHANNEL_PRIVATEYou haven't joined this channel/supergroup.
400MSG_ID_INVALIDInvalid message ID provided.
400PEER_ID_INVALIDThe provided peer id is invalid.

References