koishi-plugin-chat-analyse 1.0.5 → 1.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.js +1 -1
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -596,7 +596,7 @@ var Stat = class {
|
|
|
596
596
|
}));
|
|
597
597
|
}
|
|
598
598
|
if (this.config.enableRankStat) {
|
|
599
|
-
cmd.subcommand("rankstat", "发言排行").usage("查询发言排行,可指定查询范围,默认当前群组。").option("guild", "-g <guildId:string> 指定群组").option("type", "-t <type:string> 指定类型").option("hours", "-
|
|
599
|
+
cmd.subcommand("rankstat", "发言排行").usage("查询发言排行,可指定查询范围,默认当前群组。").option("guild", "-g <guildId:string> 指定群组").option("type", "-t <type:string> 指定类型").option("hours", "-o <hours:number> 指定时长", { fallback: 24 }).option("all", "-a 全局").action(createHandler(async (scope, options) => {
|
|
600
600
|
const { hours, type } = options;
|
|
601
601
|
const since = new Date(Date.now() - hours * import_koishi3.Time.hour);
|
|
602
602
|
const query = { uid: { $in: scope.uids }, timestamp: { $gte: since } };
|