account.setContentSettings
Set sensitive content settings (for viewing or hiding NSFW content)
func (c *Client) AccountSetContentSettings(ctx context.Context, request *AccountSetContentSettingsRequest) (bool, error)
Calling this method
client.Run(ctx, func(ctx context.Context) error {
api := client.API()
res, err := api.AccountSetContentSettings(ctx, &tg.AccountSetContentSettingsRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // bool
return nil
})
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
SensitiveEnabled | bool | — | Enable NSFW content |
Returns
bool
Possible errors
| Code | Type | Description |
|---|---|---|
| 403 | SENSITIVE_CHANGE_FORBIDDEN | You can't change your sensitive content settings. |
References
- Official documentation
- Generated Go reference
- TL definition:
account.setContentSettings#b574b16b