From 7069ac7161ec38f21f87fbb6316c65ec4699cc04 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=A6=AC=E5=89=83=20=E5=A4=A9=E6=84=9B=E6=98=9F?=
<131457234+TiaraBasori@users.noreply.github.com>
Date: Fri, 26 Dec 2025 22:08:33 +0800
Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=BA=86pangu=E6=8F=92?=
=?UTF-8?q?=E4=BB=B6=EF=BC=8C=E6=A8=A1=E4=BB=BFmode=E6=8F=92=E4=BB=B6?=
=?UTF-8?q?=E8=AE=A9=E4=BD=A0=E7=9A=84=E6=B6=88=E6=81=AF=E8=87=AA=E5=8A=A8?=
=?UTF-8?q?pangu=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
pangu化就是在中文和其他字符中间加上空格以增强可读性。
因为pangu库实在是太老了,所以干脆内置了方法。
内置的pangu方法会对链接内容进行特殊处理,保证其不被破坏。
另外,按照字母顺序整理了plugins.json,为另外一个小更新做个处理
---
pangu/pangu.ts | 669 +++++++++++++++++++++++++++++++++++++++++++++++++
plugins.json | 596 +++++++++++++++++++++----------------------
2 files changed, 969 insertions(+), 296 deletions(-)
create mode 100644 pangu/pangu.ts
diff --git a/pangu/pangu.ts b/pangu/pangu.ts
new file mode 100644
index 00000000..df425fc5
--- /dev/null
+++ b/pangu/pangu.ts
@@ -0,0 +1,669 @@
+"use strict";
+
+import { Plugin } from "@utils/pluginBase";
+import { Api } from "telegram";
+import { getPrefixes } from "@utils/pluginManager";
+import { createDirectoryInAssets } from "@utils/pathHelpers";
+import { JSONFilePreset } from "lowdb/node";
+import * as path from "path";
+import _ from "lodash";
+
+// ==========================================
+// 🛠️ 内置 Pangu 核心逻辑 (无需外部依赖)
+// ==========================================
+class PanguSpacer {
+ // CJK 字符范围 (包括中日韩统一表意文字、注音、兼容表意文字等)
+ private static readonly CJK =
+ "\u2e80-\u2eff\u2f00-\u2fdf\u3040-\u309f\u30a0-\u30fa\u30fc-\u30ff\u3100-\u312f\u3200-\u32ff\u3400-\u4dbf\u4e00-\u9fff\uf900-\ufaff";
+
+ // 基础正则
+ private static readonly ANY_CJK = new RegExp(`[${PanguSpacer.CJK}]`);
+
+ // 1. CJK 后面接 ANS (Alphabet/Number/Symbol) -> 加空格
+ // 例: "你好World" -> "你好 World"
+ // 排除: @ # (通常是标签), % (百分比), / (路径), - (连字符), _ (下划线)
+ private static readonly CONVERT_TO_FULLWIDTH_CJK_SYMBOLS_CJK = new RegExp(
+ `([${PanguSpacer.CJK}])[ ]*([\\:]+)(?=[${PanguSpacer.CJK}])`, "g"
+ );
+
+ private static readonly CJK_QUOTE = new RegExp(
+ `([${PanguSpacer.CJK}])([\"\'])`, "g"
+ );
+
+ private static readonly QUOTE_CJK = new RegExp(
+ `([\"\'])([${PanguSpacer.CJK}])`, "g"
+ );
+
+ private static readonly FIX_QUOTE_ANY_QUOTE = /([\"\'])\s*(.+?)\s*([\"\'])/g;
+
+ private static readonly CJK_HASH = new RegExp(
+ `([${PanguSpacer.CJK}])(#(\\S+))`, "g"
+ );
+
+ private static readonly HASH_CJK = new RegExp(
+ `((\\S+)#)([${PanguSpacer.CJK}])`, "g"
+ );
+
+ // 核心规则:CJK 与 英数字 的间距
+ private static readonly CJK_ANS = new RegExp(
+ `([${PanguSpacer.CJK}])([a-z0-9\`~\\!\\$\\^\\&\\*\\-\\=\\+\\\\|\\;\\,\\.\\?\\/])`, "gi"
+ );
+
+ private static readonly ANS_CJK = new RegExp(
+ `([a-z0-9\`~\\!\\$\\^\\&\\*\\-\\=\\+\\\\|\\;\\,\\.\\?\\/])([${PanguSpacer.CJK}])`, "gi"
+ );
+
+ // 处理括号
+ private static readonly CJK_BRACKET_CJK = new RegExp(
+ `([${PanguSpacer.CJK}])([\\(\\[\\{<>\u201c])(.*)([\\)\\]\\}>\u201d])([${PanguSpacer.CJK}])`, "g"
+ );
+
+ private static readonly CJK_BRACKET = new RegExp(
+ `([${PanguSpacer.CJK}])([\\(\\[\\{<>\u201c])`, "g"
+ );
+
+ private static readonly BRACKET_CJK = new RegExp(
+ `([\\)\\]\\}>\u201d])([${PanguSpacer.CJK}])`, "g"
+ );
+
+ private static readonly FIX_BRACKET_ANY_BRACKET = /([(\[{<>\u201c]+)(\s*)(.+?)(\s*)([)\]}>"\u201d]+)/g;
+
+ private static readonly CJK_ANS_CJK = new RegExp(
+ `([${PanguSpacer.CJK}])([a-z0-9\`~\\!\\$\\^\\&\\*\\-\\=\\+\\\\|\\;\\,\\.\\?\\/]+)([${PanguSpacer.CJK}])`, "gi"
+ );
+
+ private static readonly ANS_CJK_ANS = new RegExp(
+ `([a-z0-9\`~\\!\\$\\^\\&\\*\\-\\=\\+\\\\|\\;\\,\\.\\?\\/]+)([${PanguSpacer.CJK}])([a-z0-9\`~\\!\\$\\^\\&\\*\\-\\=\\+\\\\|\\;\\,\\.\\?\\/]+)`, "gi"
+ );
+
+ /**
+ * 执行格式化
+ * @param text 原始文本
+ */
+ public static spacing(text: string): string {
+ if (!text || text.length <= 1) return text;
+
+ // 如果没有中文,直接返回,节省性能
+ if (!PanguSpacer.ANY_CJK.test(text)) {
+ return text;
+ }
+
+ // 保护 URL:简单的 URL 保护,避免破坏链接
+ // 将 URL 替换为占位符 -> 处理文本 -> 还原 URL
+ const urlRegex = /https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*)/g;
+ const urls: string[] = [];
+ let tempText = text.replace(urlRegex, (match) => {
+ urls.push(match);
+ return `\uFFFF${urls.length - 1}\uFFFF`; // 使用特殊字符作为占位符
+ });
+
+ let newText = tempText;
+
+ // CJK_QUOTE: CJK + " -> CJK + " " + "
+ newText = newText.replace(PanguSpacer.CJK_QUOTE, "$1 $2");
+ // QUOTE_CJK: " + CJK -> " " + " + CJK
+ newText = newText.replace(PanguSpacer.QUOTE_CJK, "$1 $2");
+
+ newText = newText.replace(PanguSpacer.FIX_QUOTE_ANY_QUOTE, "$1$2$3");
+
+ // CJK_HASH: CJK + #word -> CJK + " " + #word
+ newText = newText.replace(PanguSpacer.CJK_HASH, "$1 $2");
+ // HASH_CJK: word# + CJK -> word# + " " + CJK
+ newText = newText.replace(PanguSpacer.HASH_CJK, "$1 $3");
+
+ // CJK_ANS: CJK + ANS -> CJK + " " + ANS
+ newText = newText.replace(PanguSpacer.CJK_ANS, "$1 $2");
+ // ANS_CJK: ANS + CJK -> ANS + " " + CJK
+ newText = newText.replace(PanguSpacer.ANS_CJK, "$1 $2");
+
+ // CJK_BRACKET: CJK + ( -> CJK + " " + (
+ newText = newText.replace(PanguSpacer.CJK_BRACKET, "$1 $2");
+ // BRACKET_CJK: ) + CJK -> ) + " " + CJK
+ newText = newText.replace(PanguSpacer.BRACKET_CJK, "$1 $2");
+
+ newText = newText.replace(PanguSpacer.FIX_BRACKET_ANY_BRACKET, "$1$3$5");
+
+ newText = newText.replace(PanguSpacer.CJK_ANS_CJK, "$1 $2 $3");
+ newText = newText.replace(PanguSpacer.ANS_CJK_ANS, "$1 $2 $3");
+
+ // 还原 URL
+ newText = newText.replace(/\uFFFF(\d+)\uFFFF/g, (_, index) => {
+ return urls[parseInt(index)];
+ });
+
+ return newText;
+ }
+}
+// ==========================================
+
+
+// HTML 转义函数
+const htmlEscape = (text: string): string =>
+ text.replace(/[&<>"']/g, m => ({
+ '&': '&', '<': '<', '>': '>',
+ '"': '"', "'": '''
+ }[m] || m));
+
+// 帮助文档
+const help_text = `⚙️ pangu - 为消息添加「盘古之白」
+
+📝 功能描述:
+• 自动在中英文、数字之间添加空格,使消息更美观易读
+• 内置核心引擎,处理 CJK 与 字母/数字/符号 之间的间距
+• 智能保护链接不被破坏
+
+🔧 使用方法:
+• .pangu - 查看当前状态/显示帮助
+• .pangu [文本] - 测试格式化效果
+• .pangu on/off - 在当前会话开启/关闭
+• .pangu global on/off - 开启/关闭全局模式
+• .pangu whitelist add/remove - 将当前会话加入/移出白名单
+• .pangu blacklist add/remove - 将当前会话加入/移出黑名单
+• .pangu stats - 查看统计信息
+
+📊 优先级说明:
+⚪ 白名单 > ⚫ 黑名单 > 💬 会话设置 > 🌐 全局模式`;
+
+// 数据库配置接口
+interface PanguConfig {
+ version: string;
+ chats: Record;
+ whitelist: string[];
+ blacklist: string[];
+ globalMode: boolean;
+ stats: {
+ formattedMessages: number;
+ lastFormatted: number | null;
+ enabledChats: number;
+ };
+}
+
+// 插件主体
+class PanguPlugin extends Plugin {
+ name = "pangu";
+ description: string = `📝 Pangu 消息格式化插件\n\n${help_text}`;
+ private db: any;
+ private prefixes: string[];
+
+ constructor() {
+ super();
+ this.prefixes = getPrefixes();
+ this.initDB();
+ }
+
+ // 初始化数据库
+ private async initDB(): Promise {
+ const dir = createDirectoryInAssets("pangu");
+ const dbPath = path.join(dir, "config.json");
+
+ const defaultConfig: PanguConfig = {
+ version: "1.0.0",
+ chats: {},
+ whitelist: [],
+ blacklist: [],
+ globalMode: false,
+ stats: {
+ formattedMessages: 0,
+ lastFormatted: null,
+ enabledChats: 0
+ }
+ };
+
+ this.db = await JSONFilePreset(dbPath, defaultConfig);
+ this.updateStats();
+ }
+
+ // 获取会话ID
+ private getChatId(msg: Api.Message): string {
+ return msg.peerId.toString();
+ }
+
+ // 获取会话模式
+ private getChatMode(chatId: string): boolean | null {
+ return this.db.data.chats.hasOwnProperty(chatId) ?
+ this.db.data.chats[chatId] : null;
+ }
+
+ // 设置会话模式
+ private async setChatMode(chatId: string, enabled: boolean): Promise {
+ this.db.data.chats[chatId] = enabled;
+ this.updateStats();
+ await this.db.write();
+ }
+
+ // 检查是否为白名单
+ private isWhite(chatId: string): boolean {
+ return this.db.data.whitelist.includes(chatId);
+ }
+
+ // 检查是否为黑名单
+ private isBlack(chatId: string): boolean {
+ return this.db.data.blacklist.includes(chatId);
+ }
+
+ // 更新统计
+ private updateStats(): void {
+ const enabledChats = Object.values(this.db.data.chats)
+ .filter(v => v === true).length;
+ this.db.data.stats.enabledChats = enabledChats;
+ }
+
+ // 记录格式化消息
+ private async recordFormattedMessage(): Promise {
+ this.db.data.stats.formattedMessages += 1;
+ this.db.data.stats.lastFormatted = Date.now();
+ await this.db.write();
+ }
+
+ // 检查文本是否发生变化 (忽略空白字符的变化,只看内容)
+ private hasContentChanged(original: string, formatted: string): boolean {
+ if (original === formatted) return false;
+
+ // 移除所有空格后比较,确保只是增加了空格,没有修改内容
+ const originalNoSpace = original.replace(/\s+/g, '');
+ const formattedNoSpace = formatted.replace(/\s+/g, '');
+
+ return originalNoSpace === formattedNoSpace;
+ }
+
+ // 白名单处理
+ private async handleWhiteList(msg: Api.Message, args: string[]): Promise {
+ const chatId = this.getChatId(msg);
+ const list = this.db.data.whitelist;
+ const subCommand = args[2]?.toLowerCase();
+
+ switch (subCommand) {
+ case "add":
+ if (!list.includes(chatId)) {
+ list.push(chatId);
+ await this.db.write();
+ await msg.edit({
+ text: `✅ 已将当前会话加入白名单`,
+ parseMode: "html"
+ });
+ } else {
+ await msg.edit({
+ text: `ℹ️ 当前会话已在白名单中`,
+ parseMode: "html"
+ });
+ }
+ break;
+
+ case "remove":
+ case "rm":
+ const removed = _.remove(list, (x: string) => x === chatId);
+ if (removed.length > 0) {
+ await this.db.write();
+ await msg.edit({
+ text: `✅ 已将当前会话移出白名单`,
+ parseMode: "html"
+ });
+ } else {
+ await msg.edit({
+ text: `ℹ️ 当前会话不在白名单中`,
+ parseMode: "html"
+ });
+ }
+ break;
+
+ case "list":
+ case "ls":
+ if (list.length === 0) {
+ await msg.edit({
+ text: `📝 白名单列表为空`,
+ parseMode: "html"
+ });
+ } else {
+ let text = `📝 白名单列表 (${list.length} 个)\n\n`;
+ list.forEach((id: string, index: number) => {
+ text += `${index + 1}. ${htmlEscape(id)}\n`;
+ });
+ await msg.edit({ text, parseMode: "html" });
+ }
+ break;
+
+ default:
+ await msg.edit({ text: help_text, parseMode: "html" });
+ break;
+ }
+ }
+
+ // 黑名单处理
+ private async handleBlackList(msg: Api.Message, args: string[]): Promise {
+ const chatId = this.getChatId(msg);
+ const list = this.db.data.blacklist;
+ const subCommand = args[2]?.toLowerCase();
+
+ switch (subCommand) {
+ case "add":
+ if (!list.includes(chatId)) {
+ list.push(chatId);
+ await this.db.write();
+ await msg.edit({
+ text: `✅ 已将当前会话加入黑名单`,
+ parseMode: "html"
+ });
+ } else {
+ await msg.edit({
+ text: `ℹ️ 当前会话已在黑名单中`,
+ parseMode: "html"
+ });
+ }
+ break;
+
+ case "remove":
+ case "rm":
+ const removed = _.remove(list, (x: string) => x === chatId);
+ if (removed.length > 0) {
+ await this.db.write();
+ await msg.edit({
+ text: `✅ 已将当前会话移出黑名单`,
+ parseMode: "html"
+ });
+ } else {
+ await msg.edit({
+ text: `ℹ️ 当前会话不在黑名单中`,
+ parseMode: "html"
+ });
+ }
+ break;
+
+ case "list":
+ case "ls":
+ if (list.length === 0) {
+ await msg.edit({
+ text: `📝 黑名单列表为空`,
+ parseMode: "html"
+ });
+ } else {
+ let text = `📝 黑名单列表 (${list.length} 个)\n\n`;
+ list.forEach((id: string, index: number) => {
+ text += `${index + 1}. ${htmlEscape(id)}\n`;
+ });
+ await msg.edit({ text, parseMode: "html" });
+ }
+ break;
+
+ default:
+ await msg.edit({ text: help_text, parseMode: "html" });
+ break;
+ }
+ }
+
+ // 全局模式处理
+ private async handleGlobalMode(msg: Api.Message, args: string[]): Promise {
+ if (args.length === 2) {
+ const globalMode = this.db.data.globalMode;
+ await msg.edit({
+ text: `🌐 全局模式: ${globalMode ? "✅ 开启" : "❌ 关闭"}`,
+ parseMode: "html"
+ });
+ return;
+ }
+
+ const modeStr = args[2].toLowerCase();
+
+ if (modeStr === "on" || modeStr === "enable" || modeStr === "true") {
+ this.db.data.globalMode = true;
+ await this.db.write();
+ await msg.edit({
+ text: `✅ 全局模式已开启`,
+ parseMode: "html"
+ });
+ } else if (modeStr === "off" || modeStr === "disable" || modeStr === "false") {
+ this.db.data.globalMode = false;
+ await this.db.write();
+ await msg.edit({
+ text: `❌ 全局模式已关闭`,
+ parseMode: "html"
+ });
+ } else {
+ await msg.edit({
+ text: `❌ 无效的参数\n\n使用:.pangu global on 或 .pangu global off`,
+ parseMode: "html"
+ });
+ }
+ }
+
+ // 测试格式化
+ private async handleTest(msg: Api.Message, text: string): Promise {
+ if (!text.trim()) {
+ await msg.edit({
+ text: `❌ 请提供测试文本\n\n使用:.pangu 你好World123测试`,
+ parseMode: "html"
+ });
+ return;
+ }
+
+ // 调用内置核心
+ const formatted = PanguSpacer.spacing(text);
+
+ await msg.edit({
+ text: `🔤 Pangu 格式化测试\n\n` +
+ `原始文本:\n${htmlEscape(text)}\n\n` +
+ `格式化后:\n${htmlEscape(formatted)}\n\n` +
+ `状态: ${text === formatted ? "无需调整" : "已优化"}`,
+ parseMode: "html"
+ });
+ }
+
+ // 显示状态
+ private async showStatus(msg: Api.Message): Promise {
+ const chatId = this.getChatId(msg);
+ const chatMode = this.getChatMode(chatId);
+ const globalMode = this.db.data.globalMode;
+ const white = this.isWhite(chatId);
+ const black = this.isBlack(chatId);
+ const stats = this.db.data.stats;
+
+ let effectiveStatus = "❓ 未知";
+ if (white) {
+ effectiveStatus = "✅ 开启 (白名单强制)";
+ } else if (black) {
+ effectiveStatus = "❌ 关闭 (黑名单强制)";
+ } else if (chatMode !== null) {
+ effectiveStatus = chatMode ? "✅ 开启" : "❌ 关闭";
+ } else {
+ effectiveStatus = globalMode ? "✅ 开启 (全局)" : "❌ 关闭 (全局)";
+ }
+
+ await msg.edit({
+ text: `📊 Pangu 格式化状态\n\n` +
+ `💬 当前会话: ${htmlEscape(chatId)}\n` +
+ `🎯 生效状态: ${effectiveStatus}\n\n` +
+ `⚪ 白名单: ${white ? "✅ 是" : "❌ 否"}\n` +
+ `⚫ 黑名单: ${black ? "✅ 是" : "❌ 否"}\n` +
+ `💬 会话设置: ${chatMode === null ? "未设置" : (chatMode ? "✅ 开启" : "❌ 关闭")}\n` +
+ `🌐 全局模式: ${globalMode ? "✅ 开启" : "❌ 关闭"}\n\n` +
+ `📈 统计信息:\n` +
+ `• 已格式化消息:${stats.formattedMessages}\n` +
+ `• 启用会话数:${stats.enabledChats}\n` +
+ `• 最后格式化:${stats.lastFormatted ? new Date(stats.lastFormatted).toLocaleString() : "从未"}`,
+ parseMode: "html"
+ });
+ }
+
+ // 显示统计信息
+ private async showStats(msg: Api.Message): Promise {
+ const stats = this.db.data.stats;
+ await msg.edit({
+ text: `📈 Pangu 统计信息\n\n` +
+ `• 已格式化消息:${stats.formattedMessages}\n` +
+ `• 启用会话数:${stats.enabledChats}\n` +
+ `• 最后格式化:${stats.lastFormatted ? new Date(stats.lastFormatted).toLocaleString() : "从未"}\n` +
+ `• 白名单数量:${this.db.data.whitelist.length}\n` +
+ `• 黑名单数量:${this.db.data.blacklist.length}\n` +
+ `• 自定义设置会话数:${Object.keys(this.db.data.chats).length}`,
+ parseMode: "html"
+ });
+ }
+
+ // 命令处理器
+ cmdHandlers: Record Promise> = {
+ pangu: async (msg: Api.Message) => {
+ try {
+ const text = msg.text || "";
+ const args = text.trim().split(/\s+/);
+ const chatId = this.getChatId(msg);
+
+ // 提取命令后的文本内容
+ const commandPattern = new RegExp(`^[${this.prefixes.map(p => `\\${p}`).join('')}]pangu\\s*`, 'i');
+ const remainingText = text.replace(commandPattern, "").trim();
+
+ // 无参数时显示状态/帮助
+ if (args.length === 1 || remainingText === "") {
+ await this.showStatus(msg);
+ return;
+ }
+
+ // 检查第一个参数是否为控制命令
+ const firstArg = args[1].toLowerCase();
+ const subCommands = ["on", "off", "global", "whitelist", "blacklist", "wl", "bl", "stats", "stat", "help", "h", "reset"];
+
+ // 如果不是子命令,则视为测试文本
+ if (!subCommands.includes(firstArg)) {
+ await this.handleTest(msg, remainingText);
+ return;
+ }
+
+ // 子命令处理
+ const subCommand = firstArg;
+
+ if (subCommand === "help" || subCommand === "h") {
+ await msg.edit({ text: help_text, parseMode: "html" });
+ return;
+ }
+
+ if (subCommand === "whitelist" || subCommand === "wl") {
+ await this.handleWhiteList(msg, args);
+ return;
+ }
+
+ if (subCommand === "blacklist" || subCommand === "bl") {
+ await this.handleBlackList(msg, args);
+ return;
+ }
+
+ if (subCommand === "global" || subCommand === "g") {
+ await this.handleGlobalMode(msg, args);
+ return;
+ }
+
+ if (subCommand === "stats" || subCommand === "stat") {
+ await this.showStats(msg);
+ return;
+ }
+
+ if (subCommand === "on" || subCommand === "enable" || subCommand === "true") {
+ await this.setChatMode(chatId, true);
+ await msg.edit({
+ text: `✅ 已在当前会话开启 pangu 格式化`,
+ parseMode: "html"
+ });
+ return;
+ }
+
+ if (subCommand === "off" || subCommand === "disable" || subCommand === "false") {
+ await this.setChatMode(chatId, false);
+ await msg.edit({
+ text: `❌ 已在当前会话关闭 pangu 格式化`,
+ parseMode: "html"
+ });
+ return;
+ }
+
+ if (subCommand === "reset") {
+ if (this.db.data.chats.hasOwnProperty(chatId)) {
+ delete this.db.data.chats[chatId];
+ await this.db.write();
+ this.updateStats();
+
+ await msg.edit({
+ text: `🔄 已重置当前会话设置`,
+ parseMode: "html"
+ });
+ } else {
+ await msg.edit({
+ text: `ℹ️ 当前会话未进行特殊设置`,
+ parseMode: "html"
+ });
+ }
+ return;
+ }
+
+ await msg.edit({
+ text: `❌ 未知命令: ${htmlEscape(subCommand)}\n\n${help_text}`,
+ parseMode: "html"
+ });
+
+ } catch (error: any) {
+ console.error(`[pangu] 命令处理错误:`, error);
+ await msg.edit({
+ text: `❌ 处理失败: ${htmlEscape(error.message || "未知错误")}`,
+ parseMode: "html"
+ });
+ }
+ }
+ };
+
+ // 消息监听器
+ listenMessageHandler = async (msg: Api.Message, options?: { isEdited?: boolean }): Promise => {
+ try {
+ const savedMessage = (msg as any).savedPeerId;
+ // 仅处理自己发出的消息 或 Saved Messages
+ if (!(msg.out || savedMessage)) return;
+
+ // 忽略空消息
+ if (!msg.text || msg.text.trim().length === 0) return;
+
+ const chatId = this.getChatId(msg);
+ const text = msg.text;
+
+ // 1. 检查是否为命令消息 (忽略)
+ const isCommand = this.prefixes.some((p: string) => text.startsWith(p)) || text.startsWith("/");
+ if (isCommand) return;
+
+ // 2. 权限/开关检查
+ if (this.db.data.whitelist.length > 0) {
+ // 如果有白名单,非白名单会话直接忽略
+ if (!this.isWhite(chatId)) {
+ return;
+ }
+ } else {
+ // 黑名单检查
+ if (this.isBlack(chatId)) {
+ return;
+ }
+
+ // 会话级开关检查
+ const chatMode = this.getChatMode(chatId);
+ if (chatMode !== null) {
+ if (!chatMode) return; // 明确关闭
+ } else {
+ // 默认检查全局开关
+ if (!this.db.data.globalMode) return;
+ }
+ }
+
+ // 3. 执行核心格式化逻辑
+ const formatted = PanguSpacer.spacing(text);
+
+ // 4. 检查是否需要更新 (避免无意义的编辑请求)
+ if (formatted !== text) {
+ try {
+ await msg.edit({ text: formatted });
+ await this.recordFormattedMessage();
+ } catch (error: any) {
+ // 可能是消息被删除、网络问题等,记录日志即可
+ console.error(`[pangu] 消息编辑失败:`, error.message);
+ }
+ }
+ } catch (error: any) {
+ console.error(`[pangu] 监听器错误:`, error);
+ }
+ };
+
+ listenMessageHandlerIgnoreEdited = false;
+}
+
+export default new PanguPlugin();
\ No newline at end of file
diff --git a/plugins.json b/plugins.json
index fa86bff7..d0b42f01 100644
--- a/plugins.json
+++ b/plugins.json
@@ -1,418 +1,422 @@
{
- "eat": {
- "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/eat/eat.ts?raw=true",
- "desc": "生成带头像表情包"
+ "aban": {
+ "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/aban/aban.ts?raw=true",
+ "desc": "高级封禁管理"
},
- "q": {
- "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/q/q.ts?raw=true",
- "desc": "消息引用生成贴纸"
+ "acron": {
+ "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/acron/acron.ts?raw=true",
+ "desc": "定时发送/转发/复制/置顶/取消置顶/删除消息/执行命令"
},
- "yt-dlp": {
- "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/yt-dlp/yt-dlp.ts?raw=true",
- "desc": "YouTube 视频下载"
+ "aff": {
+ "url": "https://github.com/TeleBoxOrg/TeleBox_Plugins/blob/main/aff/aff.ts?raw=true",
+ "desc": "机场Aff信息管理"
},
- "gt": {
- "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/gt/gt.ts?raw=true",
- "desc": "谷歌中英文互译"
+ "ai": {
+ "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/ai/ai.ts?raw=true",
+ "desc": "ai聚合"
},
- "ip": {
- "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/ip/ip.ts?raw=true",
- "desc": "IP 地址查询"
+ "aitc": {
+ "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/aitc/aitc.ts?raw=true",
+ "desc": "AI Prompt 转写"
},
- "acron": {
- "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/acron/acron.ts?raw=true",
- "desc": "定时发送/转发/复制/置顶/取消置顶/删除消息/执行命令"
+ "annualreport": {
+ "url": "https://github.com/TeleBoxOrg/TeleBox_Plugins/blob/main/annualreport/annualreport.ts?raw=true",
+ "desc": "年度报告"
},
- "music_bot": {
- "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/music_bot/music_bot.ts?raw=true",
- "desc": "多音源音乐搜索"
+ "atadmins": {
+ "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/atadmins/atadmins.ts?raw=true",
+ "desc": "一键艾特全部管理员"
},
- "netease": {
- "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/netease/netease.ts?raw=true",
- "desc": "网易云音乐"
+ "audio_to_voice": {
+ "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/audio_to_voice/audio_to_voice.ts?raw=true",
+ "desc": "音乐转音频"
+ },
+ "autochangename": {
+ "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/autochangename/autochangename.ts?raw=true",
+ "desc": "自动定时修改用户名插"
+ },
+ "autodel": {
+ "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/autodel/autodel.ts?raw=true",
+ "desc": "定时删除消息"
+ },
+ "autodelcmd": {
+ "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/autodelcmd/autodelcmd.ts?raw=true",
+ "desc": "自动删除命令消息"
+ },
+ "autorepeat": {
+ "url": "https://github.com/TeleBoxOrg/TeleBox_Plugins/blob/main/autorepeat/autorepeat.ts?raw=true",
+ "desc": "智能自动复读机"
+ },
+ "banana": {
+ "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/banana/banana.ts?raw=true",
+ "desc": "Nano-Banana 图像编辑"
+ },
+ "bin": {
+ "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/bin/bin.ts?raw=true",
+ "desc": "卡头检测"
+ },
+ "bizhi": {
+ "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/bizhi/bizhi.ts?raw=true",
+ "desc": "发送一张壁纸"
+ },
+ "botmzt": {
+ "url": "https://github.com/TeleBoxOrg/TeleBox_Plugins/blob/main/botmzt/botmzt.ts?raw=true",
+ "desc": "随机获取写真图片"
+ },
+ "bs": {
+ "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/bs/bs.ts?raw=true",
+ "desc": "保送"
},
"bulk_delete": {
"url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/bulk_delete/bulk_delete.ts?raw=true",
"desc": "批量删除消息"
},
- "aban": {
- "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/aban/aban.ts?raw=true",
- "desc": "高级封禁管理"
- },
- "search": {
- "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/search/search.ts?raw=true",
- "desc": "频道消息搜索"
+ "calc": {
+ "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/calc/calc.ts?raw=true",
+ "desc": "计算器"
},
- "music": {
- "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/music/music.ts?raw=true",
- "desc": "YouTube音乐"
+ "clean": {
+ "url": "https://github.com/TeleBoxOrg/TeleBox_Plugins/blob/main/clean/clean.ts?raw=true",
+ "desc": "账号清理工具 Pro"
},
"clean_member": {
"url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/clean_member/clean_member.ts?raw=true",
"desc": "群组成员清理"
},
- "speedtest": {
- "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/speedtest/speedtest.ts?raw=true",
- "desc": "网络速度测试"
+ "clear_sticker": {
+ "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/clear_sticker/clear_sticker.ts?raw=true",
+ "desc": "批量删除群组内贴纸"
},
- "shift": {
- "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/shift/shift.ts?raw=true",
- "desc": "智能消息转发系统"
+ "convert": {
+ "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/convert/convert.ts?raw=true",
+ "desc": "视频转音频"
+ },
+ "copy_sticker_set": {
+ "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/copy_sticker_set/copy_sticker_set.ts?raw=true",
+ "desc": "复制贴纸包"
+ },
+ "cosplay": {
+ "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/cosplay/cosplay.ts?raw=true",
+ "desc": "获取随机cos写真"
+ },
+ "crazy4": {
+ "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/crazy4/crazy4.ts?raw=true",
+ "desc": "疯狂星期四文案"
},
"da": {
"url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/da/da.ts?raw=true",
"desc": "删除群内所有消息"
},
+ "dbdj": {
+ "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/dbdj/dbdj.ts?raw=true",
+ "desc": "点兵点将 - 从最近的消息中随机抽取指定人数的用户"
+ },
"dc": {
"url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/dc/dc.ts?raw=true",
"desc": "获取实体DC"
},
- "komari": {
- "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/komari/komari.ts?raw=true",
- "desc": "Komari 服务器监控"
- },
"dig": {
"url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/dig/dig.ts?raw=true",
"desc": "DNS 查询"
},
- "keyword": {
- "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/keyword/keyword.ts?raw=true",
- "desc": "关键词自动回复"
- },
- "lottery": {
- "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/lottery/lottery.ts?raw=true",
- "desc": "抽奖"
+ "diss": {
+ "url": "https://github.com/TeleBoxOrg/TeleBox_Plugins/blob/main/diss/diss.ts?raw=true",
+ "desc": "儒雅随和版祖安语录"
},
"dme": {
"url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/dme/dme.ts?raw=true",
"desc": "删除指定数量的自己发送的消息"
},
- "autochangename": {
- "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/autochangename/autochangename.ts?raw=true",
- "desc": "自动定时修改用户名插"
- },
- "yvlu": {
- "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/yvlu/yvlu.ts?raw=true",
- "desc": "为被回复用户生成语录"
- },
- "dbdj": {
- "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/dbdj/dbdj.ts?raw=true",
- "desc": "点兵点将 - 从最近的消息中随机抽取指定人数的用户"
- },
- "rate": {
- "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/rate/rate.ts?raw=true",
- "desc": "货币实时汇率查询与计算"
- },
- "keep_online": {
- "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/keep_online/keep_online.ts?raw=true",
- "desc": "保活自动重启(测试版) 请查看说明操作"
- },
- "kitt": {
- "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/kitt/kitt.ts?raw=true",
- "desc": "高级触发器: 匹配 -> 执行, 高度自定义, 逻辑自由"
+ "eat": {
+ "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/eat/eat.ts?raw=true",
+ "desc": "生成带头像表情包"
},
- "his": {
- "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/his/his.ts?raw=true",
- "desc": "查看被回复者最近消息"
+ "eatgif": {
+ "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/eatgif/eatgif.ts?raw=true",
+ "desc": "生成\"吃掉\"动图表情包"
},
- "moyu": {
- "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/moyu/moyu.ts?raw=true",
- "desc": "摸鱼日报"
+ "encode": {
+ "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/encode/encode.ts?raw=true",
+ "desc": "简单的编码解码"
},
- "news": {
- "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/news/news.ts?raw=true",
- "desc": "每日新闻"
+ "epic": {
+ "url": "https://github.com/TeleBoxOrg/TeleBox_Plugins/blob/main/epic/epic.ts?raw=true",
+ "desc": "检查Epic Games喜加一优惠"
},
- "qr": {
- "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/qr/qr.ts?raw=true",
- "desc": "QR 二维码"
+ "fadian": {
+ "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/fadian/fadian.ts?raw=true",
+ "desc": "fadian语录"
},
- "convert": {
- "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/convert/convert.ts?raw=true",
- "desc": "视频转音频"
+ "getstickers": {
+ "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/getstickers/getstickers.ts?raw=true",
+ "desc": "下载整个贴纸包"
},
"gif": {
"url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/gif/gif.ts?raw=true",
"desc": "GIF与视频转贴纸"
},
- "trace": {
- "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/trace/trace.ts?raw=true",
- "desc": "全局追踪点赞"
+ "git_PR": {
+ "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/git_PR/git_PR.ts?raw=true",
+ "desc": "Git PR 管理"
},
- "sticker_to_pic": {
- "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/sticker_to_pic/sticker_to_pic.ts?raw=true",
- "desc": "表情转图片"
+ "goodnight": {
+ "url": "https://github.com/TeleBoxOrg/TeleBox_Plugins/blob/main/goodnight/goodnight.ts?raw=true",
+ "desc": "自动统计晚安/早安"
},
- "weather": {
- "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/weather/weather.ts?raw=true",
- "desc": "天气查询"
+ "gt": {
+ "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/gt/gt.ts?raw=true",
+ "desc": "谷歌中英文互译"
},
- "atadmins": {
- "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/atadmins/atadmins.ts?raw=true",
- "desc": "一键艾特全部管理员"
+ "his": {
+ "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/his/his.ts?raw=true",
+ "desc": "查看被回复者最近消息"
},
- "pic_to_sticker": {
- "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/pic_to_sticker/pic_to_sticker.ts?raw=true",
- "desc": "图片转表情"
+ "hitokoto": {
+ "url": "https://github.com/TeleBoxOrg/TeleBox_Plugins/blob/main/hitokoto/hitokoto.ts?raw=true",
+ "desc": "获取随机一言"
},
- "speedlink": {
- "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/speedlink/speedlink.ts?raw=true",
- "desc": "对其他服务器测速"
+ "httpcat": {
+ "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/httpcat/httpcat.ts?raw=true",
+ "desc": "发送一张http状态码主题的猫猫图片"
},
- "whois": {
- "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/whois/whois.ts?raw=true",
- "desc": "域名查询"
+ "ids": {
+ "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/ids/ids.ts?raw=true",
+ "desc": "用户信息显示以及跳转链接"
},
- "getstickers": {
- "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/getstickers/getstickers.ts?raw=true",
- "desc": "下载整个贴纸包"
+ "ip": {
+ "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/ip/ip.ts?raw=true",
+ "desc": "IP 地址查询"
},
- "clear_sticker": {
- "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/clear_sticker/clear_sticker.ts?raw=true",
- "desc": "批量删除群组内贴纸"
+ "javdb": {
+ "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/javdb/javdb.ts?raw=true",
+ "desc": "寻找番号封面"
},
- "autodel": {
- "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/autodel/autodel.ts?raw=true",
- "desc": "定时删除消息"
+ "jupai": {
+ "url": "https://github.com/TeleBoxOrg/TeleBox_Plugins/blob/main/jupai/jupai.ts?raw=true",
+ "desc": "举牌小人"
},
- "audio_to_voice": {
- "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/audio_to_voice/audio_to_voice.ts?raw=true",
- "desc": "音乐转音频"
+ "keep_online": {
+ "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/keep_online/keep_online.ts?raw=true",
+ "desc": "保活自动重启(测试版) 请查看说明操作"
},
- "copy_sticker_set": {
- "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/copy_sticker_set/copy_sticker_set.ts?raw=true",
- "desc": "复制贴纸包"
+ "keyword": {
+ "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/keyword/keyword.ts?raw=true",
+ "desc": "关键词自动回复"
},
- "t": {
- "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/t/t.ts?raw=true",
- "desc": "文字转语音"
+ "kitt": {
+ "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/kitt/kitt.ts?raw=true",
+ "desc": "高级触发器: 匹配 -> 执行, 高度自定义, 逻辑自由"
},
- "yinglish": {
- "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/yinglish/yinglish.ts?raw=true",
- "desc": "淫语翻译"
+ "kkp": {
+ "url": "https://github.com/TeleBoxOrg/TeleBox_Plugins/blob/main/kkp/kkp.ts?raw=true",
+ "desc": "获取NSFW视频"
+ },
+ "komari": {
+ "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/komari/komari.ts?raw=true",
+ "desc": "Komari 服务器监控"
+ },
+ "listusernames": {
+ "url": "https://github.com/TeleBoxOrg/TeleBox_Plugins/blob/main/listusernames/listusernames.ts?raw=true",
+ "desc": "列出属于自己的公开群组/频道"
+ },
+ "lottery": {
+ "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/lottery/lottery.ts?raw=true",
+ "desc": "抽奖"
+ },
+ "lu_bs": {
+ "url": "https://github.com/TeleBoxOrg/TeleBox_Plugins/blob/main/lu_bs/lu_bs.ts?raw=true",
+ "desc": "鲁小迅整点报时"
},
"manage_admin": {
"url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/manage_admin/manage_admin.ts?raw=true",
"desc": "管理管理员"
},
- "bizhi": {
- "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/bizhi/bizhi.ts?raw=true",
- "desc": "发送一张壁纸"
- },
- "httpcat": {
- "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/httpcat/httpcat.ts?raw=true",
- "desc": "发送一张http状态码主题的猫猫图片"
+ "mode": {
+ "url": "https://github.com/TeleBoxOrg/TeleBox_Plugins/blob/main/mode/mode.ts?raw=true",
+ "desc": "自定义消息格式"
},
- "oxost": {
- "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/oxost/oxost.ts?raw=true",
- "desc": "回复聊天中的文件与媒体 得到一个临时的下载链接"
+ "moyu": {
+ "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/moyu/moyu.ts?raw=true",
+ "desc": "摸鱼日报"
},
- "cosplay": {
- "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/cosplay/cosplay.ts?raw=true",
- "desc": "获取随机cos写真"
+ "music": {
+ "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/music/music.ts?raw=true",
+ "desc": "YouTube音乐"
},
- "crazy4": {
- "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/crazy4/crazy4.ts?raw=true",
- "desc": "疯狂星期四文案"
+ "music_bot": {
+ "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/music_bot/music_bot.ts?raw=true",
+ "desc": "多音源音乐搜索"
},
- "encode": {
- "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/encode/encode.ts?raw=true",
- "desc": "简单的编码解码"
+ "netease": {
+ "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/netease/netease.ts?raw=true",
+ "desc": "网易云音乐"
},
- "ids": {
- "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/ids/ids.ts?raw=true",
- "desc": "用户信息显示以及跳转链接"
+ "news": {
+ "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/news/news.ts?raw=true",
+ "desc": "每日新闻"
},
- "eatgif": {
- "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/eatgif/eatgif.ts?raw=true",
- "desc": "生成\"吃掉\"动图表情包"
+ "nezha": {
+ "url": "https://github.com/TeleBoxOrg/TeleBox_Plugins/blob/main/nezha/nezha.ts?raw=true",
+ "desc": "哪吒监控"
},
"ntp": {
"url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/ntp/ntp.ts?raw=true",
"desc": "NTP 时间同步"
},
- "sticker": {
- "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/sticker/sticker.ts?raw=true",
- "desc": "偷表情"
+ "openlist": {
+ "url": "https://github.com/TeleBoxOrg/TeleBox_Plugins/blob/main/openlist/openlist.ts?raw=true",
+ "desc": "openlist管理"
},
- "ssh": {
- "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/ssh/ssh.ts?raw=true",
- "desc": "ssh管理"
+ "oxost": {
+ "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/oxost/oxost.ts?raw=true",
+ "desc": "回复聊天中的文件与媒体 得到一个临时的下载链接"
},
- "warp": {
- "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/warp/warp.ts?raw=true",
- "desc": "warp管理"
+ "pangu": {
+ "url": "https://github.com/TeleBoxOrg/TeleBox_Plugins/blob/main/pangu/pangu.ts?raw=true",
+ "desc": "消息自动pangu化"
},
- "sub": {
- "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/sub/sub.ts?raw=true",
- "desc": "substore简单管理"
+ "paolu": {
+ "url": "https://github.com/TeleBoxOrg/TeleBox_Plugins/blob/main/paolu/paolu.ts?raw=true",
+ "desc": "群组一键跑路"
},
- "fadian": {
- "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/fadian/fadian.ts?raw=true",
- "desc": "fadian语录"
+ "parsehub": {
+ "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/parsehub/parsehub.ts?raw=true",
+ "desc": "社交媒体链接解析助手"
},
- "bin": {
- "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/bin/bin.ts?raw=true",
- "desc": "卡头检测"
+ "pic_to_sticker": {
+ "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/pic_to_sticker/pic_to_sticker.ts?raw=true",
+ "desc": "图片转表情"
},
- "bs": {
- "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/bs/bs.ts?raw=true",
- "desc": "保送"
+ "pmcaptcha": {
+ "url": "https://github.com/TeleBoxOrg/TeleBox_Plugins/blob/main/pmcaptcha/pmcaptcha.ts?raw=true",
+ "desc": "简单防私聊"
},
- "zpr": {
- "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/zpr/zpr.ts?raw=true",
- "desc": "二次元图片"
+ "portball": {
+ "url": "https://github.com/TeleBoxOrg/TeleBox_Plugins/blob/main/portball/portball.ts?raw=true",
+ "desc": "临时禁言"
},
- "parsehub": {
- "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/parsehub/parsehub.ts?raw=true",
- "desc": "社交媒体链接解析助手"
+ "premium": {
+ "url": "https://github.com/TeleBoxOrg/TeleBox_Plugins/blob/main/premium/premium.ts?raw=true",
+ "desc": "群组大会员统计"
},
- "zhijiao": {
- "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/zhijiao/zhijiao.ts?raw=true",
- "desc": "掷筊 强随机 使用 笅杯卦辞廿七句"
+ "prometheus": {
+ "url": "https://github.com/TeleBoxOrg/TeleBox_Plugins/blob/main/prometheus/prometheus.ts?raw=true",
+ "desc": "突破Telegram保存限制"
},
- "ai": {
- "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/ai/ai.ts?raw=true",
- "desc": "ai聚合"
+ "q": {
+ "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/q/q.ts?raw=true",
+ "desc": "消息引用生成贴纸"
},
- "aitc": {
- "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/aitc/aitc.ts?raw=true",
- "desc": "AI Prompt 转写"
+ "qr": {
+ "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/qr/qr.ts?raw=true",
+ "desc": "QR 二维码"
},
- "calc": {
- "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/calc/calc.ts?raw=true",
- "desc": "计算器"
+ "rate": {
+ "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/rate/rate.ts?raw=true",
+ "desc": "货币实时汇率查询与计算"
},
- "banana": {
- "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/banana/banana.ts?raw=true",
- "desc": "Nano-Banana 图像编辑"
+ "restore_pin": {
+ "url": "https://github.com/TeleBoxOrg/TeleBox_Plugins/blob/main/restore_pin/restore_pin.ts?raw=true",
+ "desc": "恢复群组被取消的置顶消息"
},
- "javdb": {
- "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/javdb/javdb.ts?raw=true",
- "desc": "寻找番号封面"
+ "rev": {
+ "url": "https://github.com/TeleBoxOrg/TeleBox_Plugins/blob/main/rev/rev.ts?raw=true",
+ "desc": "反转你的消息"
},
- "autodelcmd": {
- "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/autodelcmd/autodelcmd.ts?raw=true",
- "desc": "自动删除命令消息"
+ "search": {
+ "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/search/search.ts?raw=true",
+ "desc": "频道消息搜索"
},
"service": {
"url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/service/service.ts?raw=true",
"desc": "systemd服务状态查看"
},
- "git_PR": {
- "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/git_PR/git_PR.ts?raw=true",
- "desc": "Git PR 管理"
+ "shift": {
+ "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/shift/shift.ts?raw=true",
+ "desc": "智能消息转发系统"
},
"soutu": {
"url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/soutu/soutu.ts?raw=true",
"desc": "soutu搜图"
},
- "xmsl": {
- "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/xmsl/xmsl.ts?raw=true",
- "desc": "全自动羡慕"
- },
- "hitokoto": {
- "url": "https://github.com/TeleBoxOrg/TeleBox_Plugins/blob/main/hitokoto/hitokoto.ts?raw=true",
- "desc": "获取随机一言"
- },
- "teletype": {
- "url": "https://github.com/TeleBoxOrg/TeleBox_Plugins/blob/main/teletype/teletype.ts?raw=true",
- "desc": "打字机效果"
- },
- "subinfo": {
- "url": "https://github.com/TeleBoxOrg/TeleBox_Plugins/blob/main/subinfo/subinfo.ts?raw=true",
- "desc": "订阅链接信息查询"
- },
- "restore_pin": {
- "url": "https://github.com/TeleBoxOrg/TeleBox_Plugins/blob/main/restore_pin/restore_pin.ts?raw=true",
- "desc": "恢复群组被取消的置顶消息"
- },
- "premium": {
- "url": "https://github.com/TeleBoxOrg/TeleBox_Plugins/blob/main/premium/premium.ts?raw=true",
- "desc": "群组大会员统计"
- },
- "portball": {
- "url": "https://github.com/TeleBoxOrg/TeleBox_Plugins/blob/main/portball/portball.ts?raw=true",
- "desc": "临时禁言"
- },
- "lu_bs": {
- "url": "https://github.com/TeleBoxOrg/TeleBox_Plugins/blob/main/lu_bs/lu_bs.ts?raw=true",
- "desc": "鲁小迅整点报时"
+ "speedlink": {
+ "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/speedlink/speedlink.ts?raw=true",
+ "desc": "对其他服务器测速"
},
- "listusernames": {
- "url": "https://github.com/TeleBoxOrg/TeleBox_Plugins/blob/main/listusernames/listusernames.ts?raw=true",
- "desc": "列出属于自己的公开群组/频道"
+ "speedtest": {
+ "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/speedtest/speedtest.ts?raw=true",
+ "desc": "网络速度测试"
},
- "annualreport": {
- "url": "https://github.com/TeleBoxOrg/TeleBox_Plugins/blob/main/annualreport/annualreport.ts?raw=true",
- "desc": "年度报告"
+ "ssh": {
+ "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/ssh/ssh.ts?raw=true",
+ "desc": "ssh管理"
},
- "aff": {
- "url": "https://github.com/TeleBoxOrg/TeleBox_Plugins/blob/main/aff/aff.ts?raw=true",
- "desc": "机场Aff信息管理"
+ "sticker": {
+ "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/sticker/sticker.ts?raw=true",
+ "desc": "偷表情"
},
- "paolu": {
- "url": "https://github.com/TeleBoxOrg/TeleBox_Plugins/blob/main/paolu/paolu.ts?raw=true",
- "desc": "群组一键跑路"
+ "sticker_to_pic": {
+ "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/sticker_to_pic/sticker_to_pic.ts?raw=true",
+ "desc": "表情转图片"
},
- "clean": {
- "url": "https://github.com/TeleBoxOrg/TeleBox_Plugins/blob/main/clean/clean.ts?raw=true",
- "desc": "账号清理工具 Pro"
+ "sub": {
+ "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/sub/sub.ts?raw=true",
+ "desc": "substore简单管理"
},
- "diss": {
- "url": "https://github.com/TeleBoxOrg/TeleBox_Plugins/blob/main/diss/diss.ts?raw=true",
- "desc": "儒雅随和版祖安语录"
+ "subinfo": {
+ "url": "https://github.com/TeleBoxOrg/TeleBox_Plugins/blob/main/subinfo/subinfo.ts?raw=true",
+ "desc": "订阅链接信息查询"
},
- "mode": {
- "url": "https://github.com/TeleBoxOrg/TeleBox_Plugins/blob/main/mode/mode.ts?raw=true",
- "desc": "自定义消息格式"
+ "sum": {
+ "url": "https://github.com/TeleBoxOrg/TeleBox_Plugins/blob/main/sum/sum.ts?raw=true",
+ "desc": "群消息总结"
},
- "openlist": {
- "url": "https://github.com/TeleBoxOrg/TeleBox_Plugins/blob/main/openlist/openlist.ts?raw=true",
- "desc": "openlist管理"
+ "t": {
+ "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/t/t.ts?raw=true",
+ "desc": "文字转语音"
},
- "rev": {
- "url": "https://github.com/TeleBoxOrg/TeleBox_Plugins/blob/main/rev/rev.ts?raw=true",
- "desc": "反转你的消息"
+ "teletype": {
+ "url": "https://github.com/TeleBoxOrg/TeleBox_Plugins/blob/main/teletype/teletype.ts?raw=true",
+ "desc": "打字机效果"
},
- "kkp": {
- "url": "https://github.com/TeleBoxOrg/TeleBox_Plugins/blob/main/kkp/kkp.ts?raw=true",
- "desc": "获取NSFW视频"
+ "trace": {
+ "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/trace/trace.ts?raw=true",
+ "desc": "全局追踪点赞"
},
- "botmzt": {
- "url": "https://github.com/TeleBoxOrg/TeleBox_Plugins/blob/main/botmzt/botmzt.ts?raw=true",
- "desc": "随机获取写真图片"
+ "warp": {
+ "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/warp/warp.ts?raw=true",
+ "desc": "warp管理"
},
- "pmcaptcha": {
- "url": "https://github.com/TeleBoxOrg/TeleBox_Plugins/blob/main/pmcaptcha/pmcaptcha.ts?raw=true",
- "desc": "简单防私聊"
+ "weather": {
+ "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/weather/weather.ts?raw=true",
+ "desc": "天气查询"
},
- "prometheus": {
- "url": "https://github.com/TeleBoxOrg/TeleBox_Plugins/blob/main/prometheus/prometheus.ts?raw=true",
- "desc": "突破Telegram保存限制"
+ "whois": {
+ "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/whois/whois.ts?raw=true",
+ "desc": "域名查询"
},
- "autorepeat": {
- "url": "https://github.com/TeleBoxOrg/TeleBox_Plugins/blob/main/autorepeat/autorepeat.ts?raw=true",
- "desc": "智能自动复读机"
+ "xmsl": {
+ "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/xmsl/xmsl.ts?raw=true",
+ "desc": "全自动羡慕"
},
- "epic": {
- "url": "https://github.com/TeleBoxOrg/TeleBox_Plugins/blob/main/epic/epic.ts?raw=true",
- "desc": "检查Epic Games喜加一优惠"
+ "yinglish": {
+ "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/yinglish/yinglish.ts?raw=true",
+ "desc": "淫语翻译"
},
- "nezha": {
- "url": "https://github.com/TeleBoxOrg/TeleBox_Plugins/blob/main/nezha/nezha.ts?raw=true",
- "desc": "哪吒监控"
+ "yt-dlp": {
+ "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/yt-dlp/yt-dlp.ts?raw=true",
+ "desc": "YouTube 视频下载"
},
- "jupai": {
- "url": "https://github.com/TeleBoxOrg/TeleBox_Plugins/blob/main/jupai/jupai.ts?raw=true",
- "desc": "举牌小人"
+ "yvlu": {
+ "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/yvlu/yvlu.ts?raw=true",
+ "desc": "为被回复用户生成语录"
},
- "goodnight": {
- "url": "https://github.com/TeleBoxOrg/TeleBox_Plugins/blob/main/goodnight/goodnight.ts?raw=true",
- "desc": "自动统计晚安/早安"
+ "zhijiao": {
+ "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/zhijiao/zhijiao.ts?raw=true",
+ "desc": "掷筊 强随机 使用 笅杯卦辞廿七句"
},
- "sum": {
- "url": "https://github.com/TeleBoxOrg/TeleBox_Plugins/blob/main/sum/sum.ts?raw=true",
- "desc": "群消息总结"
+ "zpr": {
+ "url": "https://github.com/TeleBoxDev/TeleBox_Plugins/blob/main/zpr/zpr.ts?raw=true",
+ "desc": "二次元图片"
}
-}
+}
\ No newline at end of file