mirror of
https://github.com/FloatTech/ZeroBot-Plugin.git
synced 2025-12-19 22:00:11 +08:00
✏️ 修改了延时逻辑
This commit is contained in:
parent
3ae333e047
commit
ae46b57ea1
@ -58,9 +58,9 @@ func init() { // 插件主体
|
|||||||
zero.OnFullMatchGroup([]string{"早安", "早哇", "早上好", "ohayo", "哦哈哟", "お早う", "早好", "早"}, atriSwitch()).SetBlock(true).SetPriority(prio).
|
zero.OnFullMatchGroup([]string{"早安", "早哇", "早上好", "ohayo", "哦哈哟", "お早う", "早好", "早"}, atriSwitch()).SetBlock(true).SetPriority(prio).
|
||||||
Handle(func(ctx *zero.Ctx) {
|
Handle(func(ctx *zero.Ctx) {
|
||||||
now := time.Now().Hour()
|
now := time.Now().Hour()
|
||||||
|
time.Sleep(time.Second * 1)
|
||||||
switch {
|
switch {
|
||||||
case now < 6: // 凌晨
|
case now < 6: // 凌晨
|
||||||
time.Sleep(time.Second * 1)
|
|
||||||
ctx.SendChain(message.Reply(ctx.Event.MessageID), randText(
|
ctx.SendChain(message.Reply(ctx.Event.MessageID), randText(
|
||||||
"zzzz......",
|
"zzzz......",
|
||||||
"zzzzzzzz......",
|
"zzzzzzzz......",
|
||||||
@ -70,7 +70,6 @@ func init() { // 插件主体
|
|||||||
"...zzz....哧溜哧溜....",
|
"...zzz....哧溜哧溜....",
|
||||||
))
|
))
|
||||||
case now >= 6 && now < 9:
|
case now >= 6 && now < 9:
|
||||||
time.Sleep(time.Second * 1)
|
|
||||||
ctx.SendChain(message.Reply(ctx.Event.MessageID), randText(
|
ctx.SendChain(message.Reply(ctx.Event.MessageID), randText(
|
||||||
"啊......早上好...(哈欠)",
|
"啊......早上好...(哈欠)",
|
||||||
"唔......吧唧...早上...哈啊啊~~~\n早上好......",
|
"唔......吧唧...早上...哈啊啊~~~\n早上好......",
|
||||||
@ -83,14 +82,12 @@ func init() { // 插件主体
|
|||||||
"早上好......欸~~~脸好近呢",
|
"早上好......欸~~~脸好近呢",
|
||||||
))
|
))
|
||||||
case now >= 9 && now < 18:
|
case now >= 9 && now < 18:
|
||||||
time.Sleep(time.Second * 1)
|
|
||||||
ctx.SendChain(message.Reply(ctx.Event.MessageID), randText(
|
ctx.SendChain(message.Reply(ctx.Event.MessageID), randText(
|
||||||
"哼!这个点还早啥,昨晚干啥去了!?",
|
"哼!这个点还早啥,昨晚干啥去了!?",
|
||||||
"熬夜了对吧熬夜了对吧熬夜了对吧???!",
|
"熬夜了对吧熬夜了对吧熬夜了对吧???!",
|
||||||
"是不是熬夜是不是熬夜是不是熬夜?!",
|
"是不是熬夜是不是熬夜是不是熬夜?!",
|
||||||
))
|
))
|
||||||
case now >= 18 && now < 24:
|
case now >= 18 && now < 24:
|
||||||
time.Sleep(time.Second * 1)
|
|
||||||
ctx.SendChain(message.Reply(ctx.Event.MessageID), randText(
|
ctx.SendChain(message.Reply(ctx.Event.MessageID), randText(
|
||||||
"早个啥?哼唧!我都准备洗洗睡了!",
|
"早个啥?哼唧!我都准备洗洗睡了!",
|
||||||
"不是...你看看几点了,哼!",
|
"不是...你看看几点了,哼!",
|
||||||
@ -114,9 +111,9 @@ func init() { // 插件主体
|
|||||||
zero.OnFullMatchGroup([]string{"晚安", "oyasuminasai", "おやすみなさい", "晚好", "晚上好"}, atriSwitch()).SetBlock(true).SetPriority(prio).
|
zero.OnFullMatchGroup([]string{"晚安", "oyasuminasai", "おやすみなさい", "晚好", "晚上好"}, atriSwitch()).SetBlock(true).SetPriority(prio).
|
||||||
Handle(func(ctx *zero.Ctx) {
|
Handle(func(ctx *zero.Ctx) {
|
||||||
now := time.Now().Hour()
|
now := time.Now().Hour()
|
||||||
|
time.Sleep(time.Second * 1)
|
||||||
switch {
|
switch {
|
||||||
case now < 6: // 凌晨
|
case now < 6: // 凌晨
|
||||||
time.Sleep(time.Second * 1)
|
|
||||||
ctx.SendChain(message.Reply(ctx.Event.MessageID), randText(
|
ctx.SendChain(message.Reply(ctx.Event.MessageID), randText(
|
||||||
"zzzz......",
|
"zzzz......",
|
||||||
"zzzzzzzz......",
|
"zzzzzzzz......",
|
||||||
@ -126,7 +123,6 @@ func init() { // 插件主体
|
|||||||
"...zzz....哧溜哧溜....",
|
"...zzz....哧溜哧溜....",
|
||||||
))
|
))
|
||||||
case now >= 6 && now < 11:
|
case now >= 6 && now < 11:
|
||||||
time.Sleep(time.Second * 1)
|
|
||||||
ctx.SendChain(message.Reply(ctx.Event.MessageID), randText(
|
ctx.SendChain(message.Reply(ctx.Event.MessageID), randText(
|
||||||
"你可猝死算了吧!",
|
"你可猝死算了吧!",
|
||||||
"?啊这",
|
"?啊这",
|
||||||
@ -134,7 +130,6 @@ func init() { // 插件主体
|
|||||||
"不可忍不可忍不可忍!!为何这还不猝死!!",
|
"不可忍不可忍不可忍!!为何这还不猝死!!",
|
||||||
))
|
))
|
||||||
case now >= 11 && now < 15:
|
case now >= 11 && now < 15:
|
||||||
time.Sleep(time.Second * 1)
|
|
||||||
ctx.SendChain(message.Reply(ctx.Event.MessageID), randText(
|
ctx.SendChain(message.Reply(ctx.Event.MessageID), randText(
|
||||||
"午安w",
|
"午安w",
|
||||||
"午觉要好好睡哦,ATRI会陪伴在你身旁的w",
|
"午觉要好好睡哦,ATRI会陪伴在你身旁的w",
|
||||||
@ -142,14 +137,12 @@ func init() { // 插件主体
|
|||||||
"睡你午觉去!哼唧!!",
|
"睡你午觉去!哼唧!!",
|
||||||
))
|
))
|
||||||
case now >= 15 && now < 19:
|
case now >= 15 && now < 19:
|
||||||
time.Sleep(time.Second * 1)
|
|
||||||
ctx.SendChain(message.Reply(ctx.Event.MessageID), randText(
|
ctx.SendChain(message.Reply(ctx.Event.MessageID), randText(
|
||||||
"难不成??晚上不想睡觉??现在休息",
|
"难不成??晚上不想睡觉??现在休息",
|
||||||
"就......挺离谱的...现在睡觉",
|
"就......挺离谱的...现在睡觉",
|
||||||
"现在还是白天哦,睡觉还太早了",
|
"现在还是白天哦,睡觉还太早了",
|
||||||
))
|
))
|
||||||
case now >= 19 && now < 24:
|
case now >= 19 && now < 24:
|
||||||
time.Sleep(time.Second * 1)
|
|
||||||
ctx.SendChain(message.Reply(ctx.Event.MessageID), randText(
|
ctx.SendChain(message.Reply(ctx.Event.MessageID), randText(
|
||||||
"嗯哼哼~睡吧,就像平常一样安眠吧~o(≧▽≦)o",
|
"嗯哼哼~睡吧,就像平常一样安眠吧~o(≧▽≦)o",
|
||||||
"......(打瞌睡)",
|
"......(打瞌睡)",
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user