Skip to content

Commit 0c55316

Browse files
committed
fix: unused declaration of var
1 parent 4f5c05d commit 0c55316

File tree

2 files changed

+377
-335
lines changed

2 files changed

+377
-335
lines changed

packages/client-instagram/src/index.ts

+46-44
Original file line numberDiff line numberDiff line change
@@ -6,50 +6,52 @@ import { InstagramInteractionService } from "./services/interaction";
66
import { InstagramPostService } from "./services/post";
77

88
export const InstagramClientInterface: Client = {
9-
async start(runtime: IAgentRuntime) {
10-
try {
11-
// Validate configuration
12-
const config = await validateInstagramConfig(runtime);
13-
elizaLogger.log("Instagram client configuration validated");
14-
15-
// Initialize client and get initial state
16-
const state = await initializeClient(runtime, config);
17-
elizaLogger.log("Instagram client initialized");
18-
19-
// Create services
20-
const postService = new InstagramPostService(runtime, state);
21-
const interactionService = new InstagramInteractionService(runtime, state);
22-
23-
// Start services
24-
if (!config.INSTAGRAM_DRY_RUN) {
25-
await postService.start();
26-
elizaLogger.log("Instagram post service started");
27-
28-
if (config.INSTAGRAM_ENABLE_ACTION_PROCESSING) {
29-
await interactionService.start();
30-
elizaLogger.log("Instagram interaction service started");
9+
async start(runtime: IAgentRuntime) {
10+
try {
11+
// Validate configuration
12+
const config = await validateInstagramConfig(runtime);
13+
elizaLogger.log("Instagram client configuration validated");
14+
15+
// Initialize client and get initial state
16+
const state = await initializeClient(runtime, config);
17+
elizaLogger.log("Instagram client initialized");
18+
19+
// Create services
20+
const postService = new InstagramPostService(runtime, state);
21+
const interactionService = new InstagramInteractionService(
22+
runtime,
23+
state
24+
);
25+
26+
// Start services
27+
if (!config.INSTAGRAM_DRY_RUN) {
28+
await postService.start();
29+
elizaLogger.log("Instagram post service started");
30+
31+
if (config.INSTAGRAM_ENABLE_ACTION_PROCESSING) {
32+
await interactionService.start();
33+
elizaLogger.log("Instagram interaction service started");
34+
}
35+
} else {
36+
elizaLogger.log("Instagram client running in dry-run mode");
37+
}
38+
39+
// Return manager instance
40+
return {
41+
post: postService,
42+
interaction: interactionService,
43+
state,
44+
};
45+
} catch (error) {
46+
elizaLogger.error("Failed to start Instagram client:", error);
47+
throw error;
3148
}
32-
} else {
33-
elizaLogger.log("Instagram client running in dry-run mode");
34-
}
35-
36-
// Return manager instance
37-
return {
38-
post: postService,
39-
interaction: interactionService,
40-
state
41-
};
42-
43-
} catch (error) {
44-
elizaLogger.error("Failed to start Instagram client:", error);
45-
throw error;
46-
}
47-
},
48-
49-
async stop(runtime: IAgentRuntime) {
50-
elizaLogger.log("Stopping Instagram client services...");
51-
// Cleanup will be handled by the services themselves
52-
}
49+
},
50+
51+
async stop(_runtime: IAgentRuntime) {
52+
elizaLogger.log("Stopping Instagram client services...");
53+
// Cleanup will be handled by the services themselves
54+
},
5355
};
5456

55-
export default InstagramClientInterface;
57+
export default InstagramClientInterface;

0 commit comments

Comments
 (0)