You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: tl_quick_reply_message_gen.go
    path of file: ./repos/td/tdapi
    
    the code of the file until where you have to start completion: // Code generated by gotdgen, DO NOT EDIT.

package tdapi

import (
	"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"
)

// No-op definition for keeping imports.
var (
	_ = bin.Buffer{}
	_ = context.Background()
	_ = fmt.Stringer(nil)
	_ = strings.Builder{}
	_ = errors.Is
	_ = multierr.AppendInto
	_ = sort.Ints
	_ = tdp.Format
	_ = tger
    
func (q *QuickReplyMessage) EncodeBare(b *bin.Buffer) error {
	if q == nil {
		return fmt.Errorf("can't encode quickReplyMessage#bef92f03 as nil")
	}
	b.PutInt53(q.ID)
	if q.SendingState == nil {
		return fmt.Errorf("unable to encode quickReplyMessage#bef92f03: field sending_state is nil")
	}
	if err := q.SendingState.Encode(b); err != nil {
		return fmt.Errorf("unable to encode quickReplyMessage#bef92f03: field sending_state: %w", err)
	}
	b.PutBool(q.CanBeEdited)
	b.PutInt53(q.ReplyToMessageID)
	b.PutInt53(q.ViaBotUserID)
	b.PutLong(q.MediaAlbumID)
	if q.Content == nil {
		return fmt.Errorf("unable to encode quickReplyMessage#bef92f03: field content is nil")
	}
	if err := q.Content.Encode(b); err != nil {
		return fmt.Errorf("unable to encode quickReplyMessage#bef92f03: field content: %w", err)
	}
	if q.ReplyMarkup == nil {
		return fmt.Errorf("unable to encode quickReplyMessage#bef92f03: field reply_markup is nil")
	}
	if err := q.ReplyMarkup.Encode(b); err != nil {
		return fmt.Errorf("unable to encode quickReplyMessage#bef92f03: field reply_markup: %w", err)
	}
	return nil
}