This commit is contained in:
1-6
2023-07-27 00:24:47 +08:00
parent 63365c1506
commit 615e543845
12 changed files with 204 additions and 244 deletions
+3 -3
View File
@@ -230,7 +230,7 @@ class Sender {
allow_users?: string[]; // 用户白名单
prohibit_users?: string[]; // 群聊白名单
persistent?: boolean; //持久化监听
}): Promise<Sender> {
}): Promise<Sender | undefined> {
return new Promise(
async (resolve, reject) => {
let params: any = {
@@ -259,8 +259,8 @@ class Sender {
call.cancel();
return;
}
let s = new Sender(response.uuid);
if (options?.handle) {
let s = response.uuid ? new Sender(response.uuid) : undefined;
if (options?.handle && s) {
// console.log(`options?.handle`, options.persistent)
let obj = options?.handle(s);
if (typeof obj == "string") {