Merge branch 'master' of github.com:FloatTech/ZeroBot-Plugin

This commit is contained in:
Kanri 2021-08-25 21:51:50 +08:00
commit d0b55bb9dd
3 changed files with 24 additions and 0 deletions

View File

@ -95,6 +95,8 @@
- [x] 设置随机图片网址[url]
- [x] 太涩了(撤回最近发的图)
- [x] 评价图片(发送一张图片让bot评分)
- **浅草寺求签** `github.com/FloatTech/ZeroBot-Plugin/plugin_omikuji`
- [x] @BOT 求签|运势|占卜
- **bilibili** `import _ "github.com/FloatTech/ZeroBot-Plugin/plugin_bilibili"`
- [x] >bili info [名字]
- **嘉然** `import _ "github.com/FloatTech/ZeroBot-Plugin/plugin_diana"`

View File

@ -20,6 +20,7 @@ import (
_ "github.com/FloatTech/ZeroBot-Plugin/plugin_ai_false" // 服务器监控
_ "github.com/FloatTech/ZeroBot-Plugin/plugin_minecraft" // MCSManager
_ "github.com/FloatTech/ZeroBot-Plugin/plugin_music" // 点歌
_ "github.com/FloatTech/ZeroBot-Plugin/plugin_omikuji" // 浅草寺求签
_ "github.com/FloatTech/ZeroBot-Plugin/plugin_shindan" // 测定
// b站相关

21
plugin_omikuji/sensou.go Normal file
View File

@ -0,0 +1,21 @@
package omikuji
import (
"fmt"
"math/rand"
zero "github.com/wdvxdr1123/ZeroBot"
"github.com/wdvxdr1123/ZeroBot/message"
)
const (
bed = "https://codechina.csdn.net/u011570312/senso-ji-omikuji/-/raw/main/%d_%d.jpg"
)
func init() { // 插件主体
zero.OnFullMatchGroup([]string{"求签", "运势", "占卜"}, zero.OnlyToMe).
Handle(func(ctx *zero.Ctx) {
miku := rand.Intn(100) + 1
ctx.SendChain(message.Image(fmt.Sprintf(bed, miku, 0)), message.Image(fmt.Sprintf(bed, miku, 1)))
})
}