mirror of
https://github.com/FloatTech/ZeroBot-Plugin.git
synced 2025-12-19 13:59:39 +08:00
✨ 增加随机wife插件
This commit is contained in:
parent
ceb9455250
commit
ac4d8429d4
@ -75,6 +75,8 @@
|
||||
- [x] 异世界转生[@xxx]
|
||||
- [x] 卖萌[@xxx]
|
||||
- [x] 抽老婆[@xxx]
|
||||
- **AIWife** `import _ "github.com/FloatTech/ZeroBot-Plugin/plugin_aiwife"`
|
||||
- [x] waifu|随机waifu(从[100000个AI生成的waifu](https://www.thiswaifudoesnotexist.net/)中随机一位)
|
||||
- **gif** `import _ "github.com/tdf1939/ZeroBot-Plugin-Gif/plugin_gif"`
|
||||
- [x] 爬[@xxx]
|
||||
- [x] 摸[@xxx]
|
||||
|
||||
1
main.go
1
main.go
@ -29,6 +29,7 @@ import (
|
||||
|
||||
// 二次元图片
|
||||
_ "github.com/FloatTech/ZeroBot-Plugin/plugin_acgimage" // 随机图片与AI点评
|
||||
_ "github.com/FloatTech/ZeroBot-Plugin/plugin_aiwife" // 随机老婆
|
||||
_ "github.com/FloatTech/ZeroBot-Plugin/plugin_image_finder" // 关键字搜图
|
||||
_ "github.com/FloatTech/ZeroBot-Plugin/plugin_lolicon" // lolicon 随机图片
|
||||
_ "github.com/FloatTech/ZeroBot-Plugin/plugin_saucenao" // 以图搜图
|
||||
|
||||
24
plugin_aiwife/non-existent.go
Normal file
24
plugin_aiwife/non-existent.go
Normal file
@ -0,0 +1,24 @@
|
||||
// Package aiwife 随机老婆
|
||||
package aiwife
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"math/rand"
|
||||
"time"
|
||||
|
||||
zero "github.com/wdvxdr1123/ZeroBot"
|
||||
"github.com/wdvxdr1123/ZeroBot/message"
|
||||
)
|
||||
|
||||
const (
|
||||
bed = "https://www.thiswaifudoesnotexist.net/example-%d.jpg"
|
||||
)
|
||||
|
||||
func init() { // 插件主体
|
||||
rand.Seed(time.Now().UnixMicro())
|
||||
zero.OnFullMatchGroup([]string{"waifu", "随机waifu"}).SetPriority(10).
|
||||
Handle(func(ctx *zero.Ctx) {
|
||||
miku := rand.Intn(100000) + 1
|
||||
ctx.SendChain(message.At(ctx.Event.UserID), message.Image(fmt.Sprintf(bed, miku)))
|
||||
})
|
||||
}
|
||||
@ -1,3 +1,4 @@
|
||||
// Package omikuji 浅草寺求签
|
||||
package omikuji
|
||||
|
||||
import (
|
||||
|
||||
Loading…
Reference in New Issue
Block a user