onebots 0.1.2 → 0.1.3

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.
@@ -9,7 +9,7 @@ class CommonAction {
9
9
  */
10
10
  getLoginInfo() {
11
11
  return {
12
- user_id: this.client.uin,
12
+ user_id: this.oneBot.uin,
13
13
  nickname: this.client.nickname
14
14
  };
15
15
  }
@@ -1,6 +1,7 @@
1
1
  import { V12 } from '../../../service/V12';
2
2
  import { OnlineStatus } from "icqq";
3
3
  import { Action } from "./";
4
+ import { V11 } from "../../../service/V11";
4
5
  export declare class CommonAction {
5
6
  sendMessage(): void;
6
7
  /**
@@ -9,11 +10,16 @@ export declare class CommonAction {
9
10
  */
10
11
  deleteMsg(this: V12, message_id: string): Promise<boolean>;
11
12
  getSelfInfo(this: V12): {
12
- user_id: number;
13
+ user_id: string;
13
14
  platform: string;
14
15
  nickname: string;
15
16
  user_displayname: string;
16
17
  };
18
+ /**
19
+ * 获取 Cookies
20
+ * @param domain {string} 域名
21
+ */
22
+ getCookies(this: V11, domain: string): any;
17
23
  getStatus(this: V12): {
18
24
  good: boolean;
19
25
  bots: {
@@ -15,12 +15,19 @@ class CommonAction {
15
15
  }
16
16
  getSelfInfo() {
17
17
  return {
18
- user_id: this.client.uin,
18
+ user_id: this.oneBot.uin + '',
19
19
  platform: 'qq',
20
20
  nickname: this.client.nickname,
21
21
  user_displayname: ''
22
22
  };
23
23
  }
24
+ /**
25
+ * 获取 Cookies
26
+ * @param domain {string} 域名
27
+ */
28
+ getCookies(domain) {
29
+ return this.client.cookies[domain];
30
+ }
24
31
  getStatus() {
25
32
  return {
26
33
  good: this.oneBot.status === onebot_1.OneBotStatus.Good,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "onebots",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "基于icqq的多例oneBot实现",
5
5
  "engines": {
6
6
  "node": ">=16"