github.com/fumiama/NanoBot@v0.0.0-20231122134259-c22d8183efca/openapi_codegen_patchopenapiof.go (about)

     1  // Code generated by codegen/patchopenapiof. DO NOT EDIT.
     2  
     3  package nano
     4  
     5  import (
     6  	"io"
     7  
     8  	"github.com/pkg/errors"
     9  )
    10  
    11  func (bot *Bot) patchOpenAPIofChannel(ep string, body io.Reader) (*Channel, error) {
    12  	resp := &struct {
    13  		CodeMessageBase
    14  		Channel
    15  	}{}
    16  	err := bot.PatchOpenAPI(ep, "", resp, body)
    17  	if err != nil {
    18  		err = errors.Wrap(err, getCallerFuncName())
    19  	}
    20  	return &resp.Channel, err
    21  }
    22  
    23  func (bot *Bot) patchOpenAPIofGuildRolePatch(ep string, body io.Reader) (*GuildRolePatch, error) {
    24  	resp := &struct {
    25  		CodeMessageBase
    26  		GuildRolePatch
    27  	}{}
    28  	err := bot.PatchOpenAPI(ep, "", resp, body)
    29  	if err != nil {
    30  		err = errors.Wrap(err, getCallerFuncName())
    31  	}
    32  	return &resp.GuildRolePatch, err
    33  }