onebots 0.0.2 → 0.0.4
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/README.md
CHANGED
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
<h1>基于icqq的oneBot实现</h1>
|
|
3
3
|
<p>
|
|
4
4
|
|
|
5
|
-
[](https://www.npmjs.com/package/onebots)
|
|
6
6
|
[](https://onebot.dev/)
|
|
7
7
|
[](https://12.onebot.dev/)
|
|
8
8
|
[](https://nodejs.org)
|
|
9
9
|
[](https://jq.qq.com/?_wv=1027&k=B22VGXov)
|
|
10
10
|
|
|
11
|
-
[Type Docs](https://
|
|
11
|
+
[Type Docs](https://lc-cn.github.io/onebots)
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
</p>
|
package/lib/bin.js
CHANGED
|
@@ -58,7 +58,7 @@ export declare class CommonAction {
|
|
|
58
58
|
good: boolean;
|
|
59
59
|
};
|
|
60
60
|
login(this: V11, password?: string): Promise<unknown>;
|
|
61
|
-
submitSlider(this: V11, ticket: string):
|
|
62
|
-
submitSmsCode(this: V11, code: string):
|
|
61
|
+
submitSlider(this: V11, ticket: string): Promise<unknown>;
|
|
62
|
+
submitSmsCode(this: V11, code: string): Promise<unknown>;
|
|
63
63
|
sendSmsCode(this: V11): void;
|
|
64
64
|
}
|
|
@@ -102,11 +102,15 @@ class CommonAction {
|
|
|
102
102
|
await this.client.login(password).catch(() => resolve('登录失败'));
|
|
103
103
|
});
|
|
104
104
|
}
|
|
105
|
-
submitSlider(ticket) {
|
|
106
|
-
|
|
105
|
+
async submitSlider(ticket) {
|
|
106
|
+
await this.client.submitSlider(ticket);
|
|
107
|
+
// @ts-ignore
|
|
108
|
+
return this.action.login();
|
|
107
109
|
}
|
|
108
|
-
submitSmsCode(code) {
|
|
109
|
-
|
|
110
|
+
async submitSmsCode(code) {
|
|
111
|
+
await this.client.submitSmsCode(code);
|
|
112
|
+
// @ts-ignore
|
|
113
|
+
return this.action.login();
|
|
110
114
|
}
|
|
111
115
|
sendSmsCode() {
|
|
112
116
|
return this.client.sendSmsCode();
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { V12 } from '../../../service/V12';
|
|
2
2
|
import { OnlineStatus } from "icqq";
|
|
3
3
|
import { Action } from "./";
|
|
4
|
-
import { V11 } from "../../../service/V11";
|
|
5
4
|
export declare class CommonAction {
|
|
6
5
|
sendMsg(): void;
|
|
7
6
|
/**
|
|
@@ -24,9 +23,9 @@ export declare class CommonAction {
|
|
|
24
23
|
version: string;
|
|
25
24
|
onebot_version: string;
|
|
26
25
|
};
|
|
27
|
-
submitSlider(this:
|
|
28
|
-
submitSmsCode(this:
|
|
29
|
-
sendSmsCode(this:
|
|
30
|
-
login(this:
|
|
26
|
+
submitSlider(this: V12, ticket: string): Promise<unknown>;
|
|
27
|
+
submitSmsCode(this: V12, code: string): Promise<unknown>;
|
|
28
|
+
sendSmsCode(this: V12): void;
|
|
29
|
+
login(this: V12, password?: string): Promise<unknown>;
|
|
31
30
|
getSupportedActions(this: V12): string[];
|
|
32
31
|
}
|
|
@@ -41,11 +41,15 @@ class CommonAction {
|
|
|
41
41
|
onebot_version: '12'
|
|
42
42
|
};
|
|
43
43
|
}
|
|
44
|
-
submitSlider(ticket) {
|
|
45
|
-
|
|
44
|
+
async submitSlider(ticket) {
|
|
45
|
+
await this.client.submitSlider(ticket);
|
|
46
|
+
// @ts-ignore
|
|
47
|
+
return this.action.login();
|
|
46
48
|
}
|
|
47
|
-
submitSmsCode(code) {
|
|
48
|
-
|
|
49
|
+
async submitSmsCode(code) {
|
|
50
|
+
await this.client.submitSmsCode(code);
|
|
51
|
+
// @ts-ignore
|
|
52
|
+
return this.action.login();
|
|
49
53
|
}
|
|
50
54
|
sendSmsCode() {
|
|
51
55
|
return this.client.sendSmsCode();
|