feat: 添加截图功能

This commit is contained in:
lixiangwuxian
2024-10-13 04:54:49 +08:00
parent ffb5ff8af8
commit 056767b4f0
2 changed files with 30 additions and 2 deletions

View File

@@ -15,6 +15,7 @@ func init() {
handler.RegisterHandler("解绑ss", unbindSS)
handler.RegisterHandler("最新ss", getMyRecentScore)
handler.RegisterHandler("最热ss", getRecentScore)
handler.RegisterHandler("截图ss", screenshotSS)
}
func getMySS(msg model.Message) (reply model.Reply) {
@@ -134,3 +135,11 @@ func getMyRecentScore(msg model.Message) (reply model.Reply) {
FromMsg: msg,
}
}
func screenshotSS(msg model.Message) (reply model.Reply) {
return model.Reply{
ReplyMsg: "[CQ:image,file=file:///root/qqbot/tmp/" + scoresaber.GetSSPicture(strconv.Itoa(int(msg.UserId))) + "]",
ReferOriginMsg: true,
FromMsg: msg,
}
}