mirror of
https://github.com/A-Minos/nonebot-plugin-tetris-stats.git
synced 2026-03-05 05:36:54 +08:00
✨ 适配 Trending (#539)
* ✨ 适配 v1 tetrio 的 Trending * 🗃️ 添加 compare_delta 配置项 * 🗃️ 添加 TETRIOLeagueUserMap 索引表 * ✨ 添加对比时间配置项 * ✨ 添加 compare_delta 解析函数 * ✨ 添加 Trending 类的 compare 方法 * 🗃️ 移除不正确的复合索引 * ✨ 定时任务拉取tl数据时同步更新索引 * ✨ 适配 trending * 🐛 修复 find_entry 在无 uid 时的索引返回逻辑 * 📝 修正 compare_delta 迁移父迁移注释 * 🗃️ 为非 PostgreSQL 回填迁移补充外键约束 * 🔒 迁移中使用参数绑定设置 PG 内存参数 * ✨ 修正 Trends 的 vs 为 adpm * 🐛 修正获取玩家 ID 的范围
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
from arclet.alconna import Arg, ArgFlag
|
||||
from nonebot_plugin_alconna import Args, At, Subcommand
|
||||
from nonebot_plugin_alconna import Args, At, Option, Subcommand
|
||||
|
||||
from ...utils.duration import parse_duration
|
||||
from ...utils.exception import MessageFormatError
|
||||
from ...utils.typedefs import Me
|
||||
from .. import add_block_handlers, alc, command
|
||||
@@ -33,6 +34,16 @@ command.add(
|
||||
'unbind',
|
||||
help_text='解除绑定 TOP 账号',
|
||||
),
|
||||
Subcommand(
|
||||
'config',
|
||||
Option(
|
||||
'--default-compare',
|
||||
Arg('compare', parse_duration, notice='对比时间距离'),
|
||||
alias=['-DC', 'DefaultCompare'],
|
||||
help_text='设置默认对比时间距离',
|
||||
),
|
||||
help_text='TOP 查询个性化配置',
|
||||
),
|
||||
Subcommand(
|
||||
'query',
|
||||
Args(
|
||||
@@ -49,6 +60,12 @@ command.add(
|
||||
flags=[ArgFlag.HIDDEN, ArgFlag.OPTIONAL],
|
||||
),
|
||||
),
|
||||
Option(
|
||||
'--compare',
|
||||
Arg('compare', parse_duration),
|
||||
alias=['-C'],
|
||||
help_text='指定对比时间距离',
|
||||
),
|
||||
help_text='查询 TOP 游戏信息',
|
||||
),
|
||||
help_text='TOP 游戏相关指令',
|
||||
@@ -70,7 +87,12 @@ alc.shortcut(
|
||||
command='tstats TOP query',
|
||||
humanized='top查',
|
||||
)
|
||||
alc.shortcut(
|
||||
'(?i:top)(?i:配置|配|config)',
|
||||
command='tstats TOP config',
|
||||
humanized='top配置',
|
||||
)
|
||||
|
||||
add_block_handlers(alc.assign('TOP.query'))
|
||||
|
||||
from . import bind, query, unbind # noqa: E402, F401
|
||||
from . import bind, config, query, unbind # noqa: E402, F401
|
||||
|
||||
Reference in New Issue
Block a user