Skip to content

Commit

Permalink
Merge pull request #13 from dcvilyz/main
Browse files Browse the repository at this point in the history
Telegram Race Conditions, discord mute error handling
  • Loading branch information
somewheresy authored Dec 3, 2024
2 parents 47cc8ea + a8f9c91 commit 4c8e17d
Show file tree
Hide file tree
Showing 22 changed files with 2,838 additions and 1,204 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,17 @@ tweetcache/
twitter_cookies.json
timeline_cache.json


*.sqlite
characters/

packages/core/src/providers/cache
packages/core/src/providers/cache/*
cache/*
packages/agent/imagecache
packages/agent/imagecache/*

ROADMAP.md

twitter_archive
test.html
Expand Down
5 changes: 5 additions & 0 deletions ROADMAP.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#
# LOOMLOVE
# DCVILYZ
#
#
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion packages/agent/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ async function startAgent(character: Character) {
runtime as IAgentRuntime
);

directClient.registerAgent(await runtime);
directClient.registerAgent(runtime);

return clients;
} catch (error) {
Expand Down
30 changes: 25 additions & 5 deletions packages/core/src/cli/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -248,13 +248,33 @@ export async function startTelegram(

export async function startTwitter(runtime: IAgentRuntime) {
elizaLogger.log("Starting Twitter clients...");

// Create all clients first
const twitterSearchClient = new Client.TwitterSearchClient(runtime);
await wait();
const twitterInteractionClient = new Client.TwitterInteractionClient(
runtime
);
await wait();
const twitterInteractionClient = new Client.TwitterInteractionClient(runtime);
const twitterGenerationClient = new Client.TwitterPostClient(runtime);

// Wait for each client to be ready
await Promise.all([
new Promise<void>((resolve) => {
twitterSearchClient.once('ready', () => {
elizaLogger.log("Twitter search client ready");
resolve();
});
}),
new Promise<void>((resolve) => {
twitterInteractionClient.once('ready', () => {
elizaLogger.log("Twitter interaction client ready");
resolve();
});
}),
new Promise<void>((resolve) => {
twitterGenerationClient.once('ready', () => {
elizaLogger.log("Twitter generation client ready");
resolve();
});
})
]);

return [
twitterInteractionClient,
Expand Down
Loading

0 comments on commit 4c8e17d

Please sign in to comment.