mirror of
https://github.com/FloatTech/ZeroBot-Plugin.git
synced 2025-12-19 22:00:11 +08:00
✏️ shindan支持发送图片
This commit is contained in:
parent
c10cb49c30
commit
4776da4584
@ -5,11 +5,10 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/FloatTech/AnimeAPI/shindanmaker"
|
||||||
zero "github.com/wdvxdr1123/ZeroBot"
|
zero "github.com/wdvxdr1123/ZeroBot"
|
||||||
"github.com/wdvxdr1123/ZeroBot/extension/rate"
|
"github.com/wdvxdr1123/ZeroBot/extension/rate"
|
||||||
"github.com/wdvxdr1123/ZeroBot/message"
|
"github.com/wdvxdr1123/ZeroBot/message"
|
||||||
|
|
||||||
"github.com/FloatTech/AnimeAPI/shindanmaker"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@ -25,7 +24,7 @@ func init() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// shindanmaker 处理函数
|
// shindanmaker 处理函数
|
||||||
var handle = func(ctx *zero.Ctx) {
|
func handle(ctx *zero.Ctx) {
|
||||||
if !limit.Load(ctx.Event.UserID).Acquire() {
|
if !limit.Load(ctx.Event.UserID).Acquire() {
|
||||||
ctx.SendChain(message.Text("请稍后重试0x0..."))
|
ctx.SendChain(message.Text("请稍后重试0x0..."))
|
||||||
return
|
return
|
||||||
@ -43,11 +42,11 @@ var handle = func(ctx *zero.Ctx) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
ctx.SendChain(message.Text("ERROR: ", err))
|
ctx.SendChain(message.Text("ERROR: ", err))
|
||||||
}
|
}
|
||||||
ctx.SendChain(message.Text(text))
|
ctx.Send(text)
|
||||||
}
|
}
|
||||||
|
|
||||||
// 传入 shindanmaker id
|
// 传入 shindanmaker id
|
||||||
var number = func(id int64) func(ctx *zero.Ctx) bool {
|
func number(id int64) func(ctx *zero.Ctx) bool {
|
||||||
return func(ctx *zero.Ctx) bool {
|
return func(ctx *zero.Ctx) bool {
|
||||||
ctx.State["id"] = id
|
ctx.State["id"] = id
|
||||||
return true
|
return true
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user