Q2TG/src/constants/commands.ts

107 lines
2.7 KiB
TypeScript
Raw Normal View History

import { Api } from 'telegram';
2022-10-17 13:19:24 +00:00
const preSetupCommands = [
new Api.BotCommand({
command: 'setup',
description: '执行初始化配置',
2022-10-17 13:19:24 +00:00
}),
];
2022-03-16 14:34:11 +00:00
// 这里的 group 指群组模式Private 指在与机器人的私聊会话中
const groupPrivateCommands = [
new Api.BotCommand({
command: 'add',
description: '添加新的群转发',
2022-03-16 14:34:11 +00:00
}),
];
const personalPrivateCommands = [
new Api.BotCommand({
command: 'addfriend',
description: '添加新的好友转发',
2022-03-16 14:34:11 +00:00
}),
new Api.BotCommand({
command: 'addgroup',
description: '添加新的群转发',
2022-03-16 14:34:11 +00:00
}),
2022-10-26 10:50:00 +00:00
new Api.BotCommand({
command: 'login',
description: '当 QQ 处于下线状态时,使用此命令重新登录 QQ',
2022-10-26 10:50:00 +00:00
}),
2022-03-16 14:34:11 +00:00
];
// 服务器零号实例的管理员
const groupPrivateSuperAdminCommands = [
...groupPrivateCommands,
new Api.BotCommand({
command: 'newinstance',
description: '创建一个新的转发机器人实例',
2022-03-16 14:34:11 +00:00
}),
];
const personalPrivateSuperAdminCommands = [
...personalPrivateCommands,
new Api.BotCommand({
command: 'newinstance',
description: '创建一个新的转发机器人实例',
2022-03-16 14:34:11 +00:00
}),
];
// inChat 表示在关联了的转发群组中的命令
const inChatCommands = [
2022-03-16 14:34:11 +00:00
new Api.BotCommand({
command: 'info',
description: '查看本群或选定消息的详情',
2022-03-16 14:34:11 +00:00
}),
2023-03-01 14:16:54 +00:00
new Api.BotCommand({
command: 'search',
description: '搜索消息',
}),
];
const groupInChatCommands = [
...inChatCommands,
new Api.BotCommand({
command: 'forwardoff',
description: '暂停消息转发',
}),
new Api.BotCommand({
command: 'forwardon',
description: '恢复消息转发',
}),
new Api.BotCommand({ command: 'disable_qq_forward', description: '停止从QQ转发至TG' }),
new Api.BotCommand({ command: 'enable_qq_forward', description: '恢复从QQ转发至TG' }),
new Api.BotCommand({ command: 'disable_tg_forward', description: '停止从TG转发至QQ' }),
new Api.BotCommand({ command: 'enable_tg_forward', description: '恢复从TG转发至QQ' }),
new Api.BotCommand({
command: 'recover',
description: '恢复离线期间的 QQ 消息记录到 TG不稳定功能管理员专用',
}),
2022-03-16 14:34:11 +00:00
];
2022-04-07 07:06:50 +00:00
const personalInChatCommands = [
...inChatCommands,
2022-03-16 14:34:11 +00:00
new Api.BotCommand({
command: 'refresh',
description: '刷新头像和简介',
2022-03-16 14:34:11 +00:00
}),
2022-04-07 07:06:50 +00:00
new Api.BotCommand({
command: 'poke',
description: '戳一戳',
2022-04-07 07:06:50 +00:00
}),
2022-09-02 03:41:24 +00:00
new Api.BotCommand({
command: 'nick',
description: '获取/设置群名片',
2022-09-02 03:41:24 +00:00
}),
2022-03-16 14:34:11 +00:00
];
export default {
2022-03-16 14:34:11 +00:00
preSetupCommands,
groupPrivateCommands,
personalPrivateCommands,
groupPrivateSuperAdminCommands,
personalPrivateSuperAdminCommands,
groupInChatCommands,
2022-04-07 07:06:50 +00:00
personalInChatCommands,
};