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

Function ensureServiceInitialized

autodelcmd/autodelcmd.ts:690–704  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

688
689 try {
690 const client = await getGlobalClient();
691 if (!client) return false;
692
693 serviceInstance = new AutoDeleteService(client);
694 await serviceInstance.initialize();
695 return true;
696 } catch (error) {
697 console.error("[autodelcmd] 初始化服务时出错:", error);
698 return false;
699 }
700}
701
702class AutoDeletePlugin extends Plugin {
703 // 插件启动时自动初始化
704 constructor() {
705 super();
706 this.initializeOnStartup();
707 }

Callers 2

initializeOnStartupMethod · 0.85
AutoDeletePluginClass · 0.85

Calls 2

errorMethod · 0.80
initializeMethod · 0.45

Tested by

no test coverage detected