onebots 0.4.48 → 0.4.49
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.
|
@@ -7,6 +7,7 @@ export default class IcqqAdapter extends Adapter<"icqq"> {
|
|
|
7
7
|
constructor(app: App, config: IcqqAdapter.Config);
|
|
8
8
|
setOnline(uin: string): Promise<void>;
|
|
9
9
|
setOffline(uin: string): Promise<void>;
|
|
10
|
+
getMessage<V extends OneBot.Version>(uin: string, version: V): Promise<OneBot.Message<V>>;
|
|
10
11
|
callApi<V extends OneBot.Version>(uin: string, version: V, [name, args]: [string, any[]]): any;
|
|
11
12
|
createOneBot(uin: string, protocol: IcqqConfig, versions: OneBot.Config[]): OneBot;
|
|
12
13
|
formatEventPayload<V extends OneBot.Version>(uin: string, version: V, event: string, data: any): OneBot.Payload<V>;
|
|
@@ -130,6 +130,12 @@ class IcqqAdapter extends adapter_1.Adapter {
|
|
|
130
130
|
await oneBot.internal.logout();
|
|
131
131
|
oneBot.status = onebot_1.OneBotStatus.Bad;
|
|
132
132
|
}
|
|
133
|
+
getMessage(uin, version) {
|
|
134
|
+
const oneBot = this.getOneBot(uin);
|
|
135
|
+
if (!oneBot)
|
|
136
|
+
throw new Error("No one");
|
|
137
|
+
return oneBot.internal.getMsg(version);
|
|
138
|
+
}
|
|
133
139
|
callApi(uin, version, [name, args]) {
|
|
134
140
|
const oneBot = this.getOneBot(uin);
|
|
135
141
|
if (!oneBot)
|