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

finish dms

This commit is contained in:
源文雨
2023-10-12 00:12:04 +09:00
parent c85d8701d5
commit 4c93bb6ff8
5 changed files with 81 additions and 28 deletions

View File

@@ -43,3 +43,15 @@ func (bot *Bot) postOpenAPIofMessage(ep, contenttype string, body io.Reader) (*M
}
return &resp.Message, err
}
func (bot *Bot) postOpenAPIofDMS(ep, contenttype string, body io.Reader) (*DMS, error) {
resp := &struct {
CodeMessageBase
DMS
}{}
err := bot.PostOpenAPI(ep, contenttype, resp, body)
if err != nil {
err = errors.Wrap(err, getCallerFuncName())
}
return &resp.DMS, err
}