1
0
mirror of https://github.com/fumiama/NanoBot.git synced 2026-06-05 18:50:24 +08:00
This commit is contained in:
源文雨
2023-10-17 00:42:18 +09:00
parent edad23ff3b
commit 95a2bec150
2 changed files with 4 additions and 1 deletions

View File

@@ -1,5 +1,7 @@
package nano
import "github.com/sirupsen/logrus"
// DMS 私信会话对象
//
// https://bot.q.qq.com/wiki/develop/api/openapi/dms/model.html
@@ -25,6 +27,7 @@ func (bot *Bot) CreatePrivateChat(guildid, userid string) (*DMS, error) {
//
// - 私信的 guild_id 在创建私信会话时以及私信消息事件中获取
func (bot *Bot) PostMessageToUser(id string, content *MessagePost) (*Message, error) {
logrus.Infoln(getLogHeader(), "<= [私]频道:", id+",", content)
return bot.postMessageTo("/dms/"+id+"/messages", content)
}