mirror of
https://github.com/fumiama/NanoBot.git
synced 2026-06-05 18:50:24 +08:00
34 lines
700 B
Go
34 lines
700 B
Go
// Code generated by codegen/patchopenapiof. DO NOT EDIT.
|
|
|
|
package nano
|
|
|
|
import (
|
|
"io"
|
|
|
|
"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 &resp.Channel, err
|
|
}
|
|
|
|
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 &resp.GuildRolePatch, err
|
|
}
|