mirror of
https://github.com/FloatTech/ZeroBot-Plugin.git
synced 2025-12-20 06:20:08 +08:00
✏️ 人肉 lint
This commit is contained in:
parent
793cac09cb
commit
610f04ab87
@ -45,6 +45,7 @@ zerobot -h -t token -u url [-d|w] [-g 监听地址:端口] qq1 qq2 qq3 ...
|
|||||||
- [x] /还原 xxx (在发送的群/用户还原xxx的开启状态到初始状态)
|
- [x] /还原 xxx (在发送的群/用户还原xxx的开启状态到初始状态)
|
||||||
- [x] /用法 xxx
|
- [x] /用法 xxx
|
||||||
- [x] /服务列表
|
- [x] /服务列表
|
||||||
|
- [x] /服务详情
|
||||||
- [x] @Bot 插件冲突检测 (会在本群发送一条消息并在约 1s 后撤回以检测其它同类 bot 中已启用的插件并禁用)
|
- [x] @Bot 插件冲突检测 (会在本群发送一条消息并在约 1s 后撤回以检测其它同类 bot 中已启用的插件并禁用)
|
||||||
- **聊天** `import _ "github.com/FloatTech/ZeroBot-Plugin/plugin_chat"`
|
- **聊天** `import _ "github.com/FloatTech/ZeroBot-Plugin/plugin_chat"`
|
||||||
- [x] [BOT名字]
|
- [x] [BOT名字]
|
||||||
@ -54,7 +55,7 @@ zerobot -h -t token -u url [-d|w] [-g 监听地址:端口] qq1 qq2 qq3 ...
|
|||||||
- [x] 群温度
|
- [x] 群温度
|
||||||
- [x] 设置温度[正整数]
|
- [x] 设置温度[正整数]
|
||||||
- **ATRI** `import _ "github.com/FloatTech/ZeroBot-Plugin/plugin_atri"`
|
- **ATRI** `import _ "github.com/FloatTech/ZeroBot-Plugin/plugin_atri"`
|
||||||
- [x] 具体指令看代码
|
- [x] 具体指令看 /用法 atri
|
||||||
- 注:本插件基于 [ATRI](https://github.com/Kyomotoi/ATRI) ,为 Golang 移植版
|
- 注:本插件基于 [ATRI](https://github.com/Kyomotoi/ATRI) ,为 Golang 移植版
|
||||||
- **群管** `import _ "github.com/FloatTech/ZeroBot-Plugin/plugin_manager"`
|
- **群管** `import _ "github.com/FloatTech/ZeroBot-Plugin/plugin_manager"`
|
||||||
- [x] 禁言[@xxx][分钟]
|
- [x] 禁言[@xxx][分钟]
|
||||||
@ -145,6 +146,8 @@ zerobot -h -t token -u url [-d|w] [-g 监听地址:端口] qq1 qq2 qq3 ...
|
|||||||
- **每日运势** `import _ github.com/FloatTech/ZeroBot-Plugin/plugin_fortune`
|
- **每日运势** `import _ github.com/FloatTech/ZeroBot-Plugin/plugin_fortune`
|
||||||
- [x] 运势|抽签
|
- [x] 运势|抽签
|
||||||
- [x] 设置底图[车万 DC4 爱因斯坦 星空列车 樱云之恋 富婆妹 李清歌 公主连结 原神 明日方舟 碧蓝航线 碧蓝幻想 战双 阴阳师]
|
- [x] 设置底图[车万 DC4 爱因斯坦 星空列车 樱云之恋 富婆妹 李清歌 公主连结 原神 明日方舟 碧蓝航线 碧蓝幻想 战双 阴阳师]
|
||||||
|
- **睡眠管理** `import _ github.com/FloatTech/ZeroBot-Plugin/plugin_sleep_manage`
|
||||||
|
- [x] 早安|晚安
|
||||||
- **浅草寺求签** `import _ github.com/FloatTech/ZeroBot-Plugin/plugin_omikuji`
|
- **浅草寺求签** `import _ github.com/FloatTech/ZeroBot-Plugin/plugin_omikuji`
|
||||||
- [x] 求签|占卜
|
- [x] 求签|占卜
|
||||||
- **bilibili** `import _ "github.com/FloatTech/ZeroBot-Plugin/plugin_bilibili"`
|
- **bilibili** `import _ "github.com/FloatTech/ZeroBot-Plugin/plugin_bilibili"`
|
||||||
|
|||||||
@ -2,7 +2,6 @@
|
|||||||
package chat
|
package chat
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/FloatTech/ZeroBot-Plugin/control"
|
|
||||||
"math/rand"
|
"math/rand"
|
||||||
"strconv"
|
"strconv"
|
||||||
"time"
|
"time"
|
||||||
@ -10,6 +9,8 @@ import (
|
|||||||
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/ZeroBot-Plugin/control"
|
||||||
)
|
)
|
||||||
|
|
||||||
var poke = rate.NewManager(time.Minute*5, 8) // 戳一戳
|
var poke = rate.NewManager(time.Minute*5, 8) // 戳一戳
|
||||||
|
|||||||
@ -3,7 +3,6 @@ package manager
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/FloatTech/ZeroBot-Plugin/control"
|
|
||||||
"io"
|
"io"
|
||||||
"math/rand"
|
"math/rand"
|
||||||
"os"
|
"os"
|
||||||
@ -18,6 +17,7 @@ import (
|
|||||||
"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/ZeroBot-Plugin/control"
|
||||||
"github.com/FloatTech/ZeroBot-Plugin/plugin_manager/timer"
|
"github.com/FloatTech/ZeroBot-Plugin/plugin_manager/timer"
|
||||||
"github.com/FloatTech/ZeroBot-Plugin/utils/file"
|
"github.com/FloatTech/ZeroBot-Plugin/utils/file"
|
||||||
"github.com/FloatTech/ZeroBot-Plugin/utils/math"
|
"github.com/FloatTech/ZeroBot-Plugin/utils/math"
|
||||||
|
|||||||
@ -1,10 +1,12 @@
|
|||||||
package plugin_sleep_manage
|
package plugin_sleep_manage
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"os"
|
||||||
|
|
||||||
|
log "github.com/sirupsen/logrus"
|
||||||
|
|
||||||
"github.com/FloatTech/ZeroBot-Plugin/plugin_sleep_manage/model"
|
"github.com/FloatTech/ZeroBot-Plugin/plugin_sleep_manage/model"
|
||||||
"github.com/FloatTech/ZeroBot-Plugin/utils/process"
|
"github.com/FloatTech/ZeroBot-Plugin/utils/process"
|
||||||
log "github.com/sirupsen/logrus"
|
|
||||||
"os"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
|||||||
@ -1,11 +1,12 @@
|
|||||||
package model
|
package model
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"os"
|
||||||
|
"time"
|
||||||
|
|
||||||
"github.com/jinzhu/gorm"
|
"github.com/jinzhu/gorm"
|
||||||
_ "github.com/logoove/sqlite"
|
_ "github.com/logoove/sqlite"
|
||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
"os"
|
|
||||||
"time"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type SleepDB gorm.DB
|
type SleepDB gorm.DB
|
||||||
|
|||||||
@ -2,12 +2,14 @@ package plugin_sleep_manage
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/FloatTech/ZeroBot-Plugin/control"
|
"time"
|
||||||
"github.com/FloatTech/ZeroBot-Plugin/plugin_sleep_manage/model"
|
|
||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
zero "github.com/wdvxdr1123/ZeroBot"
|
zero "github.com/wdvxdr1123/ZeroBot"
|
||||||
"github.com/wdvxdr1123/ZeroBot/message"
|
"github.com/wdvxdr1123/ZeroBot/message"
|
||||||
"time"
|
|
||||||
|
"github.com/FloatTech/ZeroBot-Plugin/control"
|
||||||
|
"github.com/FloatTech/ZeroBot-Plugin/plugin_sleep_manage/model"
|
||||||
)
|
)
|
||||||
|
|
||||||
const dbpath = "data/SleepManage/"
|
const dbpath = "data/SleepManage/"
|
||||||
@ -65,13 +67,13 @@ func timeDuration(time time.Duration) (hour, minute, second int64) {
|
|||||||
return hour, minute, second
|
return hour, minute, second
|
||||||
}
|
}
|
||||||
|
|
||||||
//只统计6点到12点的早安
|
// 只统计6点到12点的早安
|
||||||
func isMorning(ctx *zero.Ctx) bool {
|
func isMorning(ctx *zero.Ctx) bool {
|
||||||
now := time.Now().Hour()
|
now := time.Now().Hour()
|
||||||
return now >= 6 && now <= 12
|
return now >= 6 && now <= 12
|
||||||
}
|
}
|
||||||
|
|
||||||
//只统计21点到凌晨3点的晚安
|
// 只统计21点到凌晨3点的晚安
|
||||||
func isEvening(ctx *zero.Ctx) bool {
|
func isEvening(ctx *zero.Ctx) bool {
|
||||||
now := time.Now().Hour()
|
now := time.Now().Hour()
|
||||||
return now >= 21 || now <= 3
|
return now >= 21 || now <= 3
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user