MCPcopy Create free account
hub / github.com/TeleBoxOrg/TeleBox_Plugins / showTelegraphStatus

Method showTelegraphStatus

ai/ai.ts:4238–4256  ·  view source on GitHub ↗
(
    msg: Api.Message,
    config: DB,
  )

Source from the content-addressed store, hash-verified

4236
4237 private async showTelegraphStatus(
4238 msg: Api.Message,
4239 config: DB,
4240 ): Promise<void> {
4241 let status =
4242 `📰 <b>Telegraph 状态:</b>\n\n` +
4243 `🌐 当前状态: ${config.telegraph.enabled ? "开启" : "关闭"}\n` +
4244 `📊 限制数量: <code>${config.telegraph.limit}</code>\n` +
4245 `📈 记录数量: <code>${config.telegraph.list.length}/${config.telegraph.limit}</code>`;
4246
4247 if (config.telegraph.list.length > 0) {
4248 status += "\n\n";
4249 config.telegraph.list.forEach((item, index) => {
4250 status += `${index + 1}. <a href="${item.url}">🔗 ${item.title}</a>\n`;
4251 });
4252 }
4253
4254 await this.editMessage(msg, status);
4255 }
4256
4257 private async enableTelegraph(
4258 msg: Api.Message,
4259 configManager: ConfigManager,

Callers 1

executeMethod · 0.95

Calls 1

editMessageMethod · 0.80

Tested by

no test coverage detected