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

Method init

autochangename/autochangename.ts:1511–1525  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1509 }
1510
1511 settings.timezone_format = format.startsWith('custom:') ? args.join(' ') : format.toUpperCase();
1512 if (await DataManager.saveUserSettings(settings)) {
1513 if (settings.is_enabled) await nameManager.updateUserProfile(userId, true);
1514 await msg.edit({ text: `✅ <b>时区格式已更新为:</b> <code>${htmlEscape(settings.timezone_format)}</code>`, parseMode: "html" });
1515 } else {
1516 await msg.edit({ text: "❌ 设置保存失败", parseMode: "html" });
1517 }
1518 }
1519
1520 private async handleToggleSetting(
1521 msg: Api.Message,
1522 userId: number,
1523 args: string[],
1524 options: {
1525 key: keyof UserSettings;
1526 settingName: string;
1527 command: string;
1528 defaultOn?: boolean;

Callers

nothing calls this directly

Calls 5

getAllEnabledUsersMethod · 0.80
getUserSettingsMethod · 0.80
saveUserSettingsMethod · 0.80
startAutoUpdateMethod · 0.80
errorMethod · 0.80

Tested by

no test coverage detected