diff --git a/api.go b/api.go index 977fc13..d048229 100644 --- a/api.go +++ b/api.go @@ -132,6 +132,15 @@ func (ctx *Ctx) GetForwardMessage(id string) gjson.Result { return rsp } +// SendLike 发送好友赞 +// https://github.com/botuniverse/onebot-11/blob/master/api/public.md#send_like-%E5%8F%91%E9%80%81%E5%A5%BD%E5%8F%8B%E8%B5%9E +func (ctx *Ctx) SendLike(userID int64, times int) { + ctx.CallAction("send_like", Params{ + "user_id": userID, + "times": times, + }) +} + // SetGroupKick 群组踢人 // https://github.com/botuniverse/onebot-11/blob/master/api/public.md#set_group_kick-%E7%BE%A4%E7%BB%84%E8%B8%A2%E4%BA%BA func (ctx *Ctx) SetGroupKick(groupID, userID int64, rejectAddRequest bool) { diff --git a/message/message.go b/message/message.go index 94ef982..2063825 100644 --- a/message/message.go +++ b/message/message.go @@ -217,6 +217,17 @@ func Record(file string) MessageSegment { } } +// Video 短视频 +// https://github.com/botuniverse/onebot-11/blob/master/message/segment.md#%E7%9F%AD%E8%A7%86%E9%A2%91 +func Video(file string) MessageSegment { + return MessageSegment{ + Type: "video", + Data: map[string]string{ + "file": file, + }, + } +} + // At @某人 // https://github.com/botuniverse/onebot-11/tree/master/message/segment.md#%E6%9F%90%E4%BA%BA func At(qq int64) MessageSegment {