Link Search Menu Expand Document

Method: messages.toggleBotInAttachMenu

Back to methods index

Enable or disable web bot attachment menu »


write_allowedBoolWhether the user authorizes the bot to write messages to them, if requested by attachMenuBot.request_write_accessOptional
botUsername, chat ID, Update, Message or InputUserBot IDOptional

Return type: Bool

Can bots use this method: NO

MadelineProto Example (now async for huge speed and parallelism!):

if (!file_exists('madeline.php')) {
    copy('', 'madeline.php');
include 'madeline.php';

$MadelineProto = new \danog\MadelineProto\API('session.madeline');

$Bool = $MadelineProto->messages->toggleBotInAttachMenu(write_allowed: $Bool, bot: $InputUser, enabled: $Bool, );