1
0
mirror of https://github.com/fumiama/NanoBot.git synced 2026-06-06 03:00:24 +08:00

finish pins

This commit is contained in:
源文雨
2023-10-12 00:43:15 +09:00
parent 4e7eb32a0a
commit de27ba9f2a
5 changed files with 60 additions and 3 deletions

View File

@@ -19,3 +19,15 @@ func (bot *Bot) putOpenAPIofGuildRoleChannelID(ep string, body io.Reader) (*Guil
}
return &resp.GuildRoleChannelID, err
}
func (bot *Bot) putOpenAPIofPinsMessage(ep string, body io.Reader) (*PinsMessage, error) {
resp := &struct {
CodeMessageBase
PinsMessage
}{}
err := bot.PutOpenAPI(ep, "", resp, body)
if err != nil {
err = errors.Wrap(err, getCallerFuncName())
}
return &resp.PinsMessage, err
}