Layer 220
method Users
messages.toggleBotInAttachMenu#69f59d69 flags:# write_allowed:flags.0?true bot:InputUser enabled:Bool = Bool;

Parameters

Name Type Description
Flags # Flags, see TL conditional fields
WriteAllowed flags.0?true Whether the user authorizes the bot to write messages to them, if requested by attach Menu Bot. request_write_access
Bot InputUser Bot ID
Enabled Bool Toggle

Returns

Bool

Possible Errors

Code Type Description
400 BOT_INVALID This is not a valid bot.

Gogram Example

// MessagesToggleBotInAttachMenu - using Params struct
result, err := client.MessagesToggleBotInAttachMenu(&tg.MessagesToggleBotInAttachMenuParams{
    Bot: &tg.InputUserSelf{},
    Enabled: true,

    // Optional fields:
    // WriteAllowed: true,
})
if err != nil {
    // handle error
}
// result is *tg.Bool