Skip to content

Commit

Permalink
🐛修复时间设定判定错误
Browse files Browse the repository at this point in the history
  • Loading branch information
Sirius0v0 committed Aug 21, 2022
1 parent 66afdf5 commit 36afb76
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 15 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "siriusbot2",
"version": "3.5.0",
"version": "3.5.1",
"description": "qqGroup bot for fun",
"main": "index.js",
"scripts": {
Expand Down
7 changes: 6 additions & 1 deletion plugins/dida-list/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,12 @@ function apply(hook) {
if (e.args[arg] == "current") {
time = getCurrentTimeStr();
} else {
time = e.args[arg];
if (Number.isInteger(Number(e.args[arg])) && e.args[arg].length == 4)
time = e.args[arg];
else {
e.data.reply(["设定的时间应为四位数字,如8:05应设置为0805"]);
break;
}
}
e.data.reply(await addDida(e.data.group_id, time, e.data, e.args["_"]));
subCmd = true;
Expand Down
13 changes: 0 additions & 13 deletions plugins/dida-list/test.js

This file was deleted.

0 comments on commit 36afb76

Please sign in to comment.