github.com/fumiama/NanoBot@v0.0.0-20231122134259-c22d8183efca/openapi_codegen_putopenapiof.go (about) 1 // Code generated by codegen/putopenapiof. DO NOT EDIT. 2 3 package nano 4 5 import ( 6 "io" 7 8 "github.com/pkg/errors" 9 ) 10 11 func (bot *Bot) putOpenAPIofGuildRoleChannelID(ep string, body io.Reader) (*GuildRoleChannelID, error) { 12 resp := &struct { 13 CodeMessageBase 14 GuildRoleChannelID 15 }{} 16 err := bot.PutOpenAPI(ep, "", resp, body) 17 if err != nil { 18 err = errors.Wrap(err, getCallerFuncName()) 19 } 20 return &resp.GuildRoleChannelID, err 21 } 22 23 func (bot *Bot) putOpenAPIofPinsMessage(ep string, body io.Reader) (*PinsMessage, error) { 24 resp := &struct { 25 CodeMessageBase 26 PinsMessage 27 }{} 28 err := bot.PutOpenAPI(ep, "", resp, body) 29 if err != nil { 30 err = errors.Wrap(err, getCallerFuncName()) 31 } 32 return &resp.PinsMessage, err 33 }