// Code generated by gotdgen, DO NOT EDIT.

package tg

import (
	
	
	
	
	

	

	
	
	
	
)

// No-op definition for keeping imports.
var (
	_ = bin.Buffer{}
	_ = context.Background()
	_ = fmt.Stringer(nil)
	_ = strings.Builder{}
	_ = errors.Is
	_ = multierr.AppendInto
	_ = sort.Ints
	_ = tdp.Format
	_ = tgerr.Error{}
	_ = tdjson.Encoder{}
)

// MessagesSendMessageRequest represents TL type `messages.sendMessage#280d096f`.
// Sends a message to a chat
//
// See https://core.telegram.org/method/messages.sendMessage for reference.
type MessagesSendMessageRequest struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Set this flag to disable generation of the webpage preview
	NoWebpage bool
	// Send this message silently (no notifications for the receivers)
	Silent bool
	// Send this message as background message
	Background bool
	// Clear the draft field
	ClearDraft bool
	// Only for bots, disallows forwarding and saving of the messages, even if the
	// destination chat doesn't have content protection¹ enabled
	//
	// Links:
	//  1) https://telegram.org/blog/protected-content-delete-by-date-and-more
	Noforwards bool
	// Whether to move used stickersets to top, see here for more info on this flag »¹
	//
	// Links:
	//  1) https://core.telegram.org/api/stickers#recent-stickersets
	UpdateStickersetsOrder bool
	// If set, any eventual webpage preview will be shown on top of the message instead of at
	// the bottom.
	InvertMedia bool
	// The destination where the message will be sent
	Peer InputPeerClass
	// If set, indicates that the message should be sent in reply to the specified message or
	// story.
	//
	// Use SetReplyTo and GetReplyTo helpers.
	ReplyTo InputReplyToClass
	// The message
	Message string
	// Unique client message ID required to prevent message resending
	RandomID int64
	// Reply markup for sending bot buttons
	//
	// Use SetReplyMarkup and GetReplyMarkup helpers.
	ReplyMarkup ReplyMarkupClass
	// Message entities¹ for sending styled text
	//
	// Links:
	//  1) https://core.telegram.org/api/entities
	//
	// Use SetEntities and GetEntities helpers.
	Entities []MessageEntityClass
	// Scheduled message date for scheduled messages¹
	//
	// Links:
	//  1) https://core.telegram.org/api/scheduled-messages
	//
	// Use SetScheduleDate and GetScheduleDate helpers.
	ScheduleDate int
	// Send this message as the specified peer
	//
	// Use SetSendAs and GetSendAs helpers.
	SendAs InputPeerClass
}

// MessagesSendMessageRequestTypeID is TL type id of MessagesSendMessageRequest.
const MessagesSendMessageRequestTypeID = 0x280d096f

// Ensuring interfaces in compile-time for MessagesSendMessageRequest.
var (
	_ bin.Encoder     = &MessagesSendMessageRequest{}
	_ bin.Decoder     = &MessagesSendMessageRequest{}
	_ bin.BareEncoder = &MessagesSendMessageRequest{}
	_ bin.BareDecoder = &MessagesSendMessageRequest{}
)

func ( *MessagesSendMessageRequest) () bool {
	if  == nil {
		return true
	}
	if !(.Flags.Zero()) {
		return false
	}
	if !(.NoWebpage == false) {
		return false
	}
	if !(.Silent == false) {
		return false
	}
	if !(.Background == false) {
		return false
	}
	if !(.ClearDraft == false) {
		return false
	}
	if !(.Noforwards == false) {
		return false
	}
	if !(.UpdateStickersetsOrder == false) {
		return false
	}
	if !(.InvertMedia == false) {
		return false
	}
	if !(.Peer == nil) {
		return false
	}
	if !(.ReplyTo == nil) {
		return false
	}
	if !(.Message == "") {
		return false
	}
	if !(.RandomID == 0) {
		return false
	}
	if !(.ReplyMarkup == nil) {
		return false
	}
	if !(.Entities == nil) {
		return false
	}
	if !(.ScheduleDate == 0) {
		return false
	}
	if !(.SendAs == nil) {
		return false
	}

	return true
}

// String implements fmt.Stringer.
func ( *MessagesSendMessageRequest) () string {
	if  == nil {
		return "MessagesSendMessageRequest(nil)"
	}
	type  MessagesSendMessageRequest
	return fmt.Sprintf("MessagesSendMessageRequest%+v", (*))
}

// FillFrom fills MessagesSendMessageRequest from given interface.
func ( *MessagesSendMessageRequest) ( interface {
	() ( bool)
	() ( bool)
	() ( bool)
	() ( bool)
	() ( bool)
	() ( bool)
	() ( bool)
	() ( InputPeerClass)
	() ( InputReplyToClass,  bool)
	() ( string)
	() ( int64)
	() ( ReplyMarkupClass,  bool)
	() ( []MessageEntityClass,  bool)
	() ( int,  bool)
	() ( InputPeerClass,  bool)
}) {
	.NoWebpage = .()
	.Silent = .()
	.Background = .()
	.ClearDraft = .()
	.Noforwards = .()
	.UpdateStickersetsOrder = .()
	.InvertMedia = .()
	.Peer = .()
	if ,  := .();  {
		.ReplyTo = 
	}

	.Message = .()
	.RandomID = .()
	if ,  := .();  {
		.ReplyMarkup = 
	}

	if ,  := .();  {
		.Entities = 
	}

	if ,  := .();  {
		.ScheduleDate = 
	}

	if ,  := .();  {
		.SendAs = 
	}

}

// TypeID returns type id in TL schema.
//
// See https://core.telegram.org/mtproto/TL-tl#remarks.
func (*MessagesSendMessageRequest) () uint32 {
	return MessagesSendMessageRequestTypeID
}

// TypeName returns name of type in TL schema.
func (*MessagesSendMessageRequest) () string {
	return "messages.sendMessage"
}

// TypeInfo returns info about TL type.
func ( *MessagesSendMessageRequest) () tdp.Type {
	 := tdp.Type{
		Name: "messages.sendMessage",
		ID:   MessagesSendMessageRequestTypeID,
	}
	if  == nil {
		.Null = true
		return 
	}
	.Fields = []tdp.Field{
		{
			Name:       "NoWebpage",
			SchemaName: "no_webpage",
			Null:       !.Flags.Has(1),
		},
		{
			Name:       "Silent",
			SchemaName: "silent",
			Null:       !.Flags.Has(5),
		},
		{
			Name:       "Background",
			SchemaName: "background",
			Null:       !.Flags.Has(6),
		},
		{
			Name:       "ClearDraft",
			SchemaName: "clear_draft",
			Null:       !.Flags.Has(7),
		},
		{
			Name:       "Noforwards",
			SchemaName: "noforwards",
			Null:       !.Flags.Has(14),
		},
		{
			Name:       "UpdateStickersetsOrder",
			SchemaName: "update_stickersets_order",
			Null:       !.Flags.Has(15),
		},
		{
			Name:       "InvertMedia",
			SchemaName: "invert_media",
			Null:       !.Flags.Has(16),
		},
		{
			Name:       "Peer",
			SchemaName: "peer",
		},
		{
			Name:       "ReplyTo",
			SchemaName: "reply_to",
			Null:       !.Flags.Has(0),
		},
		{
			Name:       "Message",
			SchemaName: "message",
		},
		{
			Name:       "RandomID",
			SchemaName: "random_id",
		},
		{
			Name:       "ReplyMarkup",
			SchemaName: "reply_markup",
			Null:       !.Flags.Has(2),
		},
		{
			Name:       "Entities",
			SchemaName: "entities",
			Null:       !.Flags.Has(3),
		},
		{
			Name:       "ScheduleDate",
			SchemaName: "schedule_date",
			Null:       !.Flags.Has(10),
		},
		{
			Name:       "SendAs",
			SchemaName: "send_as",
			Null:       !.Flags.Has(13),
		},
	}
	return 
}

// SetFlags sets flags for non-zero fields.
func ( *MessagesSendMessageRequest) () {
	if !(.NoWebpage == false) {
		.Flags.Set(1)
	}
	if !(.Silent == false) {
		.Flags.Set(5)
	}
	if !(.Background == false) {
		.Flags.Set(6)
	}
	if !(.ClearDraft == false) {
		.Flags.Set(7)
	}
	if !(.Noforwards == false) {
		.Flags.Set(14)
	}
	if !(.UpdateStickersetsOrder == false) {
		.Flags.Set(15)
	}
	if !(.InvertMedia == false) {
		.Flags.Set(16)
	}
	if !(.ReplyTo == nil) {
		.Flags.Set(0)
	}
	if !(.ReplyMarkup == nil) {
		.Flags.Set(2)
	}
	if !(.Entities == nil) {
		.Flags.Set(3)
	}
	if !(.ScheduleDate == 0) {
		.Flags.Set(10)
	}
	if !(.SendAs == nil) {
		.Flags.Set(13)
	}
}

// Encode implements bin.Encoder.
func ( *MessagesSendMessageRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode messages.sendMessage#280d096f as nil")
	}
	.PutID(MessagesSendMessageRequestTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *MessagesSendMessageRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode messages.sendMessage#280d096f as nil")
	}
	.SetFlags()
	if  := .Flags.Encode();  != nil {
		return fmt.Errorf("unable to encode messages.sendMessage#280d096f: field flags: %w", )
	}
	if .Peer == nil {
		return fmt.Errorf("unable to encode messages.sendMessage#280d096f: field peer is nil")
	}
	if  := .Peer.Encode();  != nil {
		return fmt.Errorf("unable to encode messages.sendMessage#280d096f: field peer: %w", )
	}
	if .Flags.Has(0) {
		if .ReplyTo == nil {
			return fmt.Errorf("unable to encode messages.sendMessage#280d096f: field reply_to is nil")
		}
		if  := .ReplyTo.Encode();  != nil {
			return fmt.Errorf("unable to encode messages.sendMessage#280d096f: field reply_to: %w", )
		}
	}
	.PutString(.Message)
	.PutLong(.RandomID)
	if .Flags.Has(2) {
		if .ReplyMarkup == nil {
			return fmt.Errorf("unable to encode messages.sendMessage#280d096f: field reply_markup is nil")
		}
		if  := .ReplyMarkup.Encode();  != nil {
			return fmt.Errorf("unable to encode messages.sendMessage#280d096f: field reply_markup: %w", )
		}
	}
	if .Flags.Has(3) {
		.PutVectorHeader(len(.Entities))
		for ,  := range .Entities {
			if  == nil {
				return fmt.Errorf("unable to encode messages.sendMessage#280d096f: field entities element with index %d is nil", )
			}
			if  := .Encode();  != nil {
				return fmt.Errorf("unable to encode messages.sendMessage#280d096f: field entities element with index %d: %w", , )
			}
		}
	}
	if .Flags.Has(10) {
		.PutInt(.ScheduleDate)
	}
	if .Flags.Has(13) {
		if .SendAs == nil {
			return fmt.Errorf("unable to encode messages.sendMessage#280d096f: field send_as is nil")
		}
		if  := .SendAs.Encode();  != nil {
			return fmt.Errorf("unable to encode messages.sendMessage#280d096f: field send_as: %w", )
		}
	}
	return nil
}

// Decode implements bin.Decoder.
func ( *MessagesSendMessageRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode messages.sendMessage#280d096f to nil")
	}
	if  := .ConsumeID(MessagesSendMessageRequestTypeID);  != nil {
		return fmt.Errorf("unable to decode messages.sendMessage#280d096f: %w", )
	}
	return .DecodeBare()
}

// DecodeBare implements bin.BareDecoder.
func ( *MessagesSendMessageRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode messages.sendMessage#280d096f to nil")
	}
	{
		if  := .Flags.Decode();  != nil {
			return fmt.Errorf("unable to decode messages.sendMessage#280d096f: field flags: %w", )
		}
	}
	.NoWebpage = .Flags.Has(1)
	.Silent = .Flags.Has(5)
	.Background = .Flags.Has(6)
	.ClearDraft = .Flags.Has(7)
	.Noforwards = .Flags.Has(14)
	.UpdateStickersetsOrder = .Flags.Has(15)
	.InvertMedia = .Flags.Has(16)
	{
		,  := DecodeInputPeer()
		if  != nil {
			return fmt.Errorf("unable to decode messages.sendMessage#280d096f: field peer: %w", )
		}
		.Peer = 
	}
	if .Flags.Has(0) {
		,  := DecodeInputReplyTo()
		if  != nil {
			return fmt.Errorf("unable to decode messages.sendMessage#280d096f: field reply_to: %w", )
		}
		.ReplyTo = 
	}
	{
		,  := .String()
		if  != nil {
			return fmt.Errorf("unable to decode messages.sendMessage#280d096f: field message: %w", )
		}
		.Message = 
	}
	{
		,  := .Long()
		if  != nil {
			return fmt.Errorf("unable to decode messages.sendMessage#280d096f: field random_id: %w", )
		}
		.RandomID = 
	}
	if .Flags.Has(2) {
		,  := DecodeReplyMarkup()
		if  != nil {
			return fmt.Errorf("unable to decode messages.sendMessage#280d096f: field reply_markup: %w", )
		}
		.ReplyMarkup = 
	}
	if .Flags.Has(3) {
		,  := .VectorHeader()
		if  != nil {
			return fmt.Errorf("unable to decode messages.sendMessage#280d096f: field entities: %w", )
		}

		if  > 0 {
			.Entities = make([]MessageEntityClass, 0, %bin.PreallocateLimit)
		}
		for  := 0;  < ; ++ {
			,  := DecodeMessageEntity()
			if  != nil {
				return fmt.Errorf("unable to decode messages.sendMessage#280d096f: field entities: %w", )
			}
			.Entities = append(.Entities, )
		}
	}
	if .Flags.Has(10) {
		,  := .Int()
		if  != nil {
			return fmt.Errorf("unable to decode messages.sendMessage#280d096f: field schedule_date: %w", )
		}
		.ScheduleDate = 
	}
	if .Flags.Has(13) {
		,  := DecodeInputPeer()
		if  != nil {
			return fmt.Errorf("unable to decode messages.sendMessage#280d096f: field send_as: %w", )
		}
		.SendAs = 
	}
	return nil
}

// SetNoWebpage sets value of NoWebpage conditional field.
func ( *MessagesSendMessageRequest) ( bool) {
	if  {
		.Flags.Set(1)
		.NoWebpage = true
	} else {
		.Flags.Unset(1)
		.NoWebpage = false
	}
}

// GetNoWebpage returns value of NoWebpage conditional field.
func ( *MessagesSendMessageRequest) () ( bool) {
	if  == nil {
		return
	}
	return .Flags.Has(1)
}

// SetSilent sets value of Silent conditional field.
func ( *MessagesSendMessageRequest) ( bool) {
	if  {
		.Flags.Set(5)
		.Silent = true
	} else {
		.Flags.Unset(5)
		.Silent = false
	}
}

// GetSilent returns value of Silent conditional field.
func ( *MessagesSendMessageRequest) () ( bool) {
	if  == nil {
		return
	}
	return .Flags.Has(5)
}

// SetBackground sets value of Background conditional field.
func ( *MessagesSendMessageRequest) ( bool) {
	if  {
		.Flags.Set(6)
		.Background = true
	} else {
		.Flags.Unset(6)
		.Background = false
	}
}

// GetBackground returns value of Background conditional field.
func ( *MessagesSendMessageRequest) () ( bool) {
	if  == nil {
		return
	}
	return .Flags.Has(6)
}

// SetClearDraft sets value of ClearDraft conditional field.
func ( *MessagesSendMessageRequest) ( bool) {
	if  {
		.Flags.Set(7)
		.ClearDraft = true
	} else {
		.Flags.Unset(7)
		.ClearDraft = false
	}
}

// GetClearDraft returns value of ClearDraft conditional field.
func ( *MessagesSendMessageRequest) () ( bool) {
	if  == nil {
		return
	}
	return .Flags.Has(7)
}

// SetNoforwards sets value of Noforwards conditional field.
func ( *MessagesSendMessageRequest) ( bool) {
	if  {
		.Flags.Set(14)
		.Noforwards = true
	} else {
		.Flags.Unset(14)
		.Noforwards = false
	}
}

// GetNoforwards returns value of Noforwards conditional field.
func ( *MessagesSendMessageRequest) () ( bool) {
	if  == nil {
		return
	}
	return .Flags.Has(14)
}

// SetUpdateStickersetsOrder sets value of UpdateStickersetsOrder conditional field.
func ( *MessagesSendMessageRequest) ( bool) {
	if  {
		.Flags.Set(15)
		.UpdateStickersetsOrder = true
	} else {
		.Flags.Unset(15)
		.UpdateStickersetsOrder = false
	}
}

// GetUpdateStickersetsOrder returns value of UpdateStickersetsOrder conditional field.
func ( *MessagesSendMessageRequest) () ( bool) {
	if  == nil {
		return
	}
	return .Flags.Has(15)
}

// SetInvertMedia sets value of InvertMedia conditional field.
func ( *MessagesSendMessageRequest) ( bool) {
	if  {
		.Flags.Set(16)
		.InvertMedia = true
	} else {
		.Flags.Unset(16)
		.InvertMedia = false
	}
}

// GetInvertMedia returns value of InvertMedia conditional field.
func ( *MessagesSendMessageRequest) () ( bool) {
	if  == nil {
		return
	}
	return .Flags.Has(16)
}

// GetPeer returns value of Peer field.
func ( *MessagesSendMessageRequest) () ( InputPeerClass) {
	if  == nil {
		return
	}
	return .Peer
}

// SetReplyTo sets value of ReplyTo conditional field.
func ( *MessagesSendMessageRequest) ( InputReplyToClass) {
	.Flags.Set(0)
	.ReplyTo = 
}

// GetReplyTo returns value of ReplyTo conditional field and
// boolean which is true if field was set.
func ( *MessagesSendMessageRequest) () ( InputReplyToClass,  bool) {
	if  == nil {
		return
	}
	if !.Flags.Has(0) {
		return , false
	}
	return .ReplyTo, true
}

// GetMessage returns value of Message field.
func ( *MessagesSendMessageRequest) () ( string) {
	if  == nil {
		return
	}
	return .Message
}

// GetRandomID returns value of RandomID field.
func ( *MessagesSendMessageRequest) () ( int64) {
	if  == nil {
		return
	}
	return .RandomID
}

// SetReplyMarkup sets value of ReplyMarkup conditional field.
func ( *MessagesSendMessageRequest) ( ReplyMarkupClass) {
	.Flags.Set(2)
	.ReplyMarkup = 
}

// GetReplyMarkup returns value of ReplyMarkup conditional field and
// boolean which is true if field was set.
func ( *MessagesSendMessageRequest) () ( ReplyMarkupClass,  bool) {
	if  == nil {
		return
	}
	if !.Flags.Has(2) {
		return , false
	}
	return .ReplyMarkup, true
}

// SetEntities sets value of Entities conditional field.
func ( *MessagesSendMessageRequest) ( []MessageEntityClass) {
	.Flags.Set(3)
	.Entities = 
}

// GetEntities returns value of Entities conditional field and
// boolean which is true if field was set.
func ( *MessagesSendMessageRequest) () ( []MessageEntityClass,  bool) {
	if  == nil {
		return
	}
	if !.Flags.Has(3) {
		return , false
	}
	return .Entities, true
}

// SetScheduleDate sets value of ScheduleDate conditional field.
func ( *MessagesSendMessageRequest) ( int) {
	.Flags.Set(10)
	.ScheduleDate = 
}

// GetScheduleDate returns value of ScheduleDate conditional field and
// boolean which is true if field was set.
func ( *MessagesSendMessageRequest) () ( int,  bool) {
	if  == nil {
		return
	}
	if !.Flags.Has(10) {
		return , false
	}
	return .ScheduleDate, true
}

// SetSendAs sets value of SendAs conditional field.
func ( *MessagesSendMessageRequest) ( InputPeerClass) {
	.Flags.Set(13)
	.SendAs = 
}

// GetSendAs returns value of SendAs conditional field and
// boolean which is true if field was set.
func ( *MessagesSendMessageRequest) () ( InputPeerClass,  bool) {
	if  == nil {
		return
	}
	if !.Flags.Has(13) {
		return , false
	}
	return .SendAs, true
}

// MapEntities returns field Entities wrapped in MessageEntityClassArray helper.
func ( *MessagesSendMessageRequest) () ( MessageEntityClassArray,  bool) {
	if !.Flags.Has(3) {
		return , false
	}
	return MessageEntityClassArray(.Entities), true
}

// MessagesSendMessage invokes method messages.sendMessage#280d096f returning error if any.
// Sends a message to a chat
//
// Possible errors:
//
//	400 ADMIN_RIGHTS_EMPTY:
//	400 BOT_DOMAIN_INVALID: Bot domain invalid.
//	400 BOT_INVALID: This is not a valid bot.
//	400 BUTTON_DATA_INVALID: The data of one or more of the buttons you provided is invalid.
//	400 BUTTON_TYPE_INVALID: The type of one or more of the buttons you provided is invalid.
//	400 BUTTON_URL_INVALID: Button URL invalid.
//	400 BUTTON_USER_PRIVACY_RESTRICTED: The privacy setting of the user specified in a inputKeyboardButtonUserProfile button do not allow creating such a button.
//	400 CHANNEL_INVALID: The provided channel is invalid.
//	406 CHANNEL_PRIVATE: You haven't joined this channel/supergroup.
//	403 CHAT_ADMIN_REQUIRED: You must be an admin in this chat to do this.
//	403 CHAT_GUEST_SEND_FORBIDDEN: You join the discussion group before commenting, see here » for more info.
//	400 CHAT_ID_INVALID: The provided chat id is invalid.
//	400 CHAT_RESTRICTED: You can't send messages in this chat, you were restricted.
//	403 CHAT_SEND_PLAIN_FORBIDDEN: You can't send non-media (text) messages in this chat.
//	403 CHAT_WRITE_FORBIDDEN: You can't write in this chat.
//	400 DOCUMENT_INVALID: The specified document is invalid.
//	400 ENCRYPTION_DECLINED: The secret chat was declined.
//	400 ENTITIES_TOO_LONG: You provided too many styled message entities.
//	400 ENTITY_BOUNDS_INVALID: A specified entity offset or length is invalid, see here » for info on how to properly compute the entity offset/length.
//	400 ENTITY_MENTION_USER_INVALID: You mentioned an invalid user.
//	400 FROM_MESSAGE_BOT_DISABLED: Bots can't use fromMessage min constructors.
//	400 INPUT_USER_DEACTIVATED: The specified user was deleted.
//	400 MESSAGE_EMPTY: The provided message is empty.
//	400 MESSAGE_TOO_LONG: The provided message is too long.
//	400 MSG_ID_INVALID: Invalid message ID provided.
//	500 MSG_WAIT_FAILED: A waiting call returned an error.
//	406 PAYMENT_UNSUPPORTED: A detailed description of the error will be received separately as described here ».
//	400 PEER_ID_INVALID: The provided peer id is invalid.
//	400 PINNED_DIALOGS_TOO_MUCH: Too many pinned dialogs.
//	400 POLL_OPTION_INVALID: Invalid poll option provided.
//	500 RANDOM_ID_DUPLICATE: You provided a random ID that was already used.
//	400 REPLY_MARKUP_INVALID: The provided reply markup is invalid.
//	400 REPLY_MARKUP_TOO_LONG: The specified reply_markup is too long.
//	400 REPLY_TO_INVALID: The specified reply_to field is invalid.
//	400 REPLY_TO_USER_INVALID: The replied-to user is invalid.
//	400 SCHEDULE_BOT_NOT_ALLOWED: Bots cannot schedule messages.
//	400 SCHEDULE_DATE_TOO_LATE: You can't schedule a message this far in the future.
//	400 SCHEDULE_STATUS_PRIVATE: Can't schedule until user is online, if the user's last seen timestamp is hidden by their privacy settings.
//	400 SCHEDULE_TOO_MUCH: There are too many scheduled messages.
//	400 SEND_AS_PEER_INVALID: You can't send messages as the specified peer.
//	420 SLOWMODE_WAIT_%d: Slowmode is enabled in this chat: wait %d seconds before sending another message to this chat.
//	400 STORY_ID_INVALID: The specified story ID is invalid.
//	406 TOPIC_CLOSED: This topic was closed, you can't send messages to it anymore.
//	406 TOPIC_DELETED: The specified topic was deleted.
//	400 USER_BANNED_IN_CHANNEL: You're banned from sending messages in supergroups/channels.
//	403 USER_IS_BLOCKED: You were blocked by this user.
//	400 USER_IS_BOT: Bots can't send messages to other bots.
//	400 WC_CONVERT_URL_INVALID: WC convert URL invalid.
//	400 YOU_BLOCKED_USER: You blocked this user.
//
// See https://core.telegram.org/method/messages.sendMessage for reference.
// Can be used by bots.
func ( *Client) ( context.Context,  *MessagesSendMessageRequest) (UpdatesClass, error) {
	var  UpdatesBox

	if  := .rpc.Invoke(, , &);  != nil {
		return nil, 
	}
	return .Updates, nil
}