package  tgimport  (	"context" 	"errors" 	"fmt" 	"sort" 	"strings" 	"go.uber.org/multierr" 	"github.com/gotd/td/bin" 	"github.com/gotd/td/tdjson" 	"github.com/gotd/td/tdp" 	"github.com/gotd/td/tgerr" )var  (	_ = bin .Buffer {}	_ = context .Background ()	_ = fmt .Stringer (nil )	_ = strings .Builder {}	_ = errors .Is 	_ = multierr .AppendInto 	_ = sort .Ints 	_ = tdp .Format 	_ = tgerr .Error {}	_ = tdjson .Encoder {})type  BotsGetBotMenuButtonRequest  struct  {		UserID  InputUserClass }const  BotsGetBotMenuButtonRequestTypeID  = 0x9c60eb28 var  (	_ bin .Encoder      = &BotsGetBotMenuButtonRequest {}	_ bin .Decoder      = &BotsGetBotMenuButtonRequest {}	_ bin .BareEncoder  = &BotsGetBotMenuButtonRequest {}	_ bin .BareDecoder  = &BotsGetBotMenuButtonRequest {})func  (g  *BotsGetBotMenuButtonRequest ) Zero bool  {	if  g  == nil  {		return  true 	}	if  !(g .UserID  == nil ) {		return  false 	}	return  true }func  (g  *BotsGetBotMenuButtonRequest ) String string  {	if  g  == nil  {		return  "BotsGetBotMenuButtonRequest(nil)" 	}	type  Alias  BotsGetBotMenuButtonRequest 	return  fmt .Sprintf ("BotsGetBotMenuButtonRequest%+v" , Alias (*g ))}func  (g  *BotsGetBotMenuButtonRequest ) FillFrom from  interface  {	GetUserID () (value  InputUserClass )}) {	g .UserID  = from .GetUserID ()}func  (*BotsGetBotMenuButtonRequest ) TypeID uint32  {	return  BotsGetBotMenuButtonRequestTypeID }func  (*BotsGetBotMenuButtonRequest ) TypeName string  {	return  "bots.getBotMenuButton" }func  (g  *BotsGetBotMenuButtonRequest ) TypeInfo tdp .Type  {	typ  := tdp .Type {		Name : "bots.getBotMenuButton" ,		ID :   BotsGetBotMenuButtonRequestTypeID ,	}	if  g  == nil  {		typ .Null  = true 		return  typ 	}	typ .Fields  = []tdp .Field {		{			Name :       "UserID" ,			SchemaName : "user_id" ,		},	}	return  typ }func  (g  *BotsGetBotMenuButtonRequest ) Encode b  *bin .Buffer ) error  {	if  g  == nil  {		return  fmt .Errorf ("can't encode bots.getBotMenuButton#9c60eb28 as nil" )	}	b .PutID (BotsGetBotMenuButtonRequestTypeID )	return  g .EncodeBare (b )}func  (g  *BotsGetBotMenuButtonRequest ) EncodeBare b  *bin .Buffer ) error  {	if  g  == nil  {		return  fmt .Errorf ("can't encode bots.getBotMenuButton#9c60eb28 as nil" )	}	if  g .UserID  == nil  {		return  fmt .Errorf ("unable to encode bots.getBotMenuButton#9c60eb28: field user_id is nil" )	}	if  err  := g .UserID .Encode (b ); err  != nil  {		return  fmt .Errorf ("unable to encode bots.getBotMenuButton#9c60eb28: field user_id: %w" , err )	}	return  nil }func  (g  *BotsGetBotMenuButtonRequest ) Decode b  *bin .Buffer ) error  {	if  g  == nil  {		return  fmt .Errorf ("can't decode bots.getBotMenuButton#9c60eb28 to nil" )	}	if  err  := b .ConsumeID (BotsGetBotMenuButtonRequestTypeID ); err  != nil  {		return  fmt .Errorf ("unable to decode bots.getBotMenuButton#9c60eb28: %w" , err )	}	return  g .DecodeBare (b )}func  (g  *BotsGetBotMenuButtonRequest ) DecodeBare b  *bin .Buffer ) error  {	if  g  == nil  {		return  fmt .Errorf ("can't decode bots.getBotMenuButton#9c60eb28 to nil" )	}	{		value , err  := DecodeInputUser (b )		if  err  != nil  {			return  fmt .Errorf ("unable to decode bots.getBotMenuButton#9c60eb28: field user_id: %w" , err )		}		g .UserID  = value 	}	return  nil }func  (g  *BotsGetBotMenuButtonRequest ) GetUserID value  InputUserClass ) {	if  g  == nil  {		return 	}	return  g .UserID }func  (c  *Client ) BotsGetBotMenuButton ctx  context .Context , userid  InputUserClass ) (BotMenuButtonClass , error ) {	var  result  BotMenuButtonBox 	request  := &BotsGetBotMenuButtonRequest {		UserID : userid ,	}	if  err  := c .rpc .Invoke (ctx , request , &result ); err  != nil  {		return  nil , err 	}	return  result .BotMenuButton , nil } The pages are generated with Golds v0.6.7 . (GOOS=linux GOARCH=amd64)
Golds  is a Go 101  project developed by Tapir Liu .
PR and bug reports are welcome and can be submitted to the issue list .
Please follow @Go100and1  (reachable from the left QR code) to get the latest news of Golds .