Skip to main content

contacts.setBlocked

Replace the contents of an entire blocklist, see here for more info ».

func (c *Client) ContactsSetBlocked(ctx context.Context, request *ContactsSetBlockedRequest) (bool, error)

Calling this method

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

res, err := api.ContactsSetBlocked(ctx, &tg.ContactsSetBlockedRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // bool
return nil
})

Parameters

NameTypeRequiredDescription
MyStoriesFromboolWhether to edit the story blocklist; if not set, will edit the main blocklist. See here » for differences between the two.
ID[]InputPeerClassyesFull content of the blocklist.
LimitintyesMaximum number of results to return, see pagination

Returns

bool

References