MCPcopy Create free account
hub / github.com/CreminiAI/skillpack / start

Method start

src/runtime/adapters/slack.ts:73–97  ·  view source on GitHub ↗
(ctx: AdapterContext)

Source from the content-addressed store, hash-verified

71 }
72
73 async start(ctx: AdapterContext): Promise<void> {
74 this.agent = ctx.agent;
75 this.rootDir = ctx.rootDir;
76 this.ipcBroadcaster = ctx.ipcBroadcaster ?? null;
77
78 this.app = new App({
79 token: this.options.botToken,
80 appToken: this.options.appToken,
81 socketMode: true,
82 ignoreSelf: true,
83 logLevel: LogLevel.INFO,
84 });
85
86 const auth = await this.app.client.auth.test({
87 token: this.options.botToken,
88 });
89 this.botUserId =
90 typeof auth.user_id === "string" ? auth.user_id : null;
91
92 this.registerListeners(this.app);
93 await this.app.start();
94
95 const identity = this.botUserId ? `<@${this.botUserId}>` : "Slack bot";
96 console.log(`[SlackAdapter] Started as ${identity}`);
97 }
98
99 async stop(): Promise<void> {
100 if (this.app) {

Callers 1

startServerFunction · 0.95

Calls 2

registerListenersMethod · 0.95
startMethod · 0.65

Tested by

no test coverage detected