|
@@ -67,6 +67,7 @@ class default_1 {
|
|
chatID: {
|
|
chatID: {
|
|
qq: Number(session.userId),
|
|
qq: Number(session.userId),
|
|
group: Number(session.sender.groupId),
|
|
group: Number(session.sender.groupId),
|
|
|
|
+ toString: () => session.userId,
|
|
},
|
|
},
|
|
chatType: "temp",
|
|
chatType: "temp",
|
|
};
|
|
};
|
|
@@ -172,7 +173,7 @@ class default_1 {
|
|
const cmdObj = command_1.parseCmd(session.content);
|
|
const cmdObj = command_1.parseCmd(session.content);
|
|
const reply = (msg) => __awaiter(this, void 0, void 0, function* () {
|
|
const reply = (msg) => __awaiter(this, void 0, void 0, function* () {
|
|
const userString = `${session.username}(${session.userId})`;
|
|
const userString = `${session.username}(${session.userId})`;
|
|
- return session.sendQueued(msg)
|
|
|
|
|
|
+ return (chat.chatType === "group" ? this.sendToGroup : this.sendToUser)(chat.chatID.toString(), msg)
|
|
.catch(error => { logger.error(`error replying to message from ${userString}, error: ${error}`); });
|
|
.catch(error => { logger.error(`error replying to message from ${userString}, error: ${error}`); });
|
|
});
|
|
});
|
|
switch (cmdObj.cmd) {
|
|
switch (cmdObj.cmd) {
|
|
@@ -196,8 +197,8 @@ class default_1 {
|
|
if (cmdObj.args.length === 0) {
|
|
if (cmdObj.args.length === 0) {
|
|
reply(`Instagram 故事搬运机器人:
|
|
reply(`Instagram 故事搬运机器人:
|
|
/igstory - 查询当前聊天中的 Instagram Stories 动态订阅
|
|
/igstory - 查询当前聊天中的 Instagram Stories 动态订阅
|
|
-/igstory_subscribe〈链接|用户名〉- 订阅 Instagram Stories 搬运
|
|
|
|
-/igstory_unsubscribe〈链接|用户名〉- 退订 Instagram Stories 媒体搬运
|
|
|
|
|
|
+/igstory_sub[scribe]〈链接|用户名〉- 订阅 Instagram Stories 搬运
|
|
|
|
+/igstory_unsub[scribe]〈链接|用户名〉- 退订 Instagram Stories 媒体搬运
|
|
/igstory_view〈链接|用户名〉- 查看该用户所有 Stories\
|
|
/igstory_view〈链接|用户名〉- 查看该用户所有 Stories\
|
|
${chat.chatType === "temp" ?
|
|
${chat.chatType === "temp" ?
|
|
'\n(当前游客模式下无法使用订阅功能,请先添加本账号为好友。)' : ''}`);
|
|
'\n(当前游客模式下无法使用订阅功能,请先添加本账号为好友。)' : ''}`);
|