|
@@ -53,7 +53,7 @@ function sub(chat, args, reply, lock, lockfile) {
|
|
|
return reply('请先添加机器人为好友。');
|
|
|
}
|
|
|
if (args.length === 0) {
|
|
|
- return reply('找不到要订阅推特故事的链接。');
|
|
|
+ return reply('找不到要订阅推特限时动态的链接。');
|
|
|
}
|
|
|
const match = parseLink(args[0]);
|
|
|
if (!match) {
|
|
@@ -61,7 +61,7 @@ function sub(chat, args, reply, lock, lockfile) {
|
|
|
示例:https://twitter.com/sunflower930316`);
|
|
|
}
|
|
|
const subscribeTo = (link, config = {}) => {
|
|
|
- const { addNew = false, msg = `已为此聊天订阅 ${link} 的推特故事` } = config;
|
|
|
+ const { addNew = false, msg = `已为此聊天订阅 ${link} 的推特限时动态` } = config;
|
|
|
if (addNew) {
|
|
|
lock.feed.push(link);
|
|
|
lock.threads[link] = {
|
|
@@ -94,7 +94,7 @@ function unsub(chat, args, reply, lock, lockfile) {
|
|
|
return reply('请先添加机器人为好友。');
|
|
|
}
|
|
|
if (args.length === 0) {
|
|
|
- return reply('找不到要退订推特故事的链接。');
|
|
|
+ return reply('找不到要退订推特限时动态的链接。');
|
|
|
}
|
|
|
const match = parseLink(args[0]);
|
|
|
if (!match) {
|
|
@@ -102,12 +102,12 @@ function unsub(chat, args, reply, lock, lockfile) {
|
|
|
}
|
|
|
const [link, index] = linkFinder(match, chat, lock);
|
|
|
if (index === -1)
|
|
|
- return list(chat, args, msg => reply('您没有订阅此链接的推特故事。\n' + msg), lock);
|
|
|
+ return list(chat, args, msg => reply('您没有订阅此链接的推特限时动态。\n' + msg), lock);
|
|
|
else {
|
|
|
lock.threads[link].subscribers.splice(index, 1);
|
|
|
fs.writeFileSync(path.resolve(lockfile), JSON.stringify(lock));
|
|
|
logger.warn(`chat ${JSON.stringify(chat)} has unsubscribed ${link}`);
|
|
|
- return reply(`已为此聊天退订 ${link} 的推特故事`);
|
|
|
+ return reply(`已为此聊天退订 ${link} 的推特限时动态`);
|
|
|
}
|
|
|
}
|
|
|
exports.unsub = unsub;
|
|
@@ -120,7 +120,7 @@ function list(chat, _, reply, lock) {
|
|
|
if (lock.threads[key].subscribers.find(({ chatID, chatType }) => chat.chatID === chatID && chat.chatType === chatType))
|
|
|
links.push(`${key} ${datetime_1.relativeDate(lock.threads[key].updatedAt)}`);
|
|
|
});
|
|
|
- return reply('此聊天中订阅推特故事的链接:\n' + links.join('\n'));
|
|
|
+ return reply('此聊天中订阅推特限时动态的链接:\n' + links.join('\n'));
|
|
|
}
|
|
|
exports.list = list;
|
|
|
function view(chat, args, reply) {
|