mirror of
https://github.com/fumiama/NanoBot.git
synced 2026-06-05 10:40:24 +08:00
37 lines
868 B
Go
37 lines
868 B
Go
// Code generated by codegen/patchopenapiof. DO NOT EDIT.
|
|
|
|
package nano
|
|
|
|
import (
|
|
"io"
|
|
"unsafe"
|
|
|
|
"github.com/pkg/errors"
|
|
)
|
|
|
|
func (bot *Bot) patchOpenAPIofChannel(ep string, body io.Reader) (*Channel, error) {
|
|
resp := &struct {
|
|
CodeMessageBase
|
|
Channel
|
|
}{}
|
|
err := bot.PatchOpenAPI(ep, resp, body)
|
|
if err != nil {
|
|
err = errors.Wrap(err, getCallerFuncName())
|
|
return nil, err
|
|
}
|
|
return (*Channel)(unsafe.Add(unsafe.Pointer(resp), unsafe.Sizeof(CodeMessageBase{}))), nil
|
|
}
|
|
|
|
func (bot *Bot) patchOpenAPIofGuildRolePatch(ep string, body io.Reader) (*GuildRolePatch, error) {
|
|
resp := &struct {
|
|
CodeMessageBase
|
|
GuildRolePatch
|
|
}{}
|
|
err := bot.PatchOpenAPI(ep, resp, body)
|
|
if err != nil {
|
|
err = errors.Wrap(err, getCallerFuncName())
|
|
return nil, err
|
|
}
|
|
return (*GuildRolePatch)(unsafe.Add(unsafe.Pointer(resp), unsafe.Sizeof(CodeMessageBase{}))), nil
|
|
}
|