Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
cornip committed Dec 19, 2024
1 parent 586478a commit f84c0c8
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 16 deletions.
17 changes: 9 additions & 8 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ tokio-rusqlite = { version = "0.6.0", features = ["bundled"] }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
thiserror = "2.0.4"
futures = "0.3"
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,9 @@ To get the cookie string, you need to:
5. In Request Headers, copy the cookie value
6. Paste it in your .env file

```env
# Client
CLIENTS = "discord,twitter,telegram"


```env
# Twitter Configuration
TWITTER_USERNAME=your_username
TWITTER_PASSWORD=your_password
Expand Down
2 changes: 1 addition & 1 deletion rina-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ rig-twitter = { path = "../rig-twitter" }
reqwest = { version = "0.12", features = ["json"] }
rand = "0.8.5"
teloxide = "0.10.0"
teloxide-core = "0.10.0"
teloxide-core = "0.10.0"
2 changes: 2 additions & 0 deletions rina/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ version = "0.1.0"
edition = "2021"

[dependencies]
futures = "0.3"
rina-core = { path = "../rina-core" }
tokio = { version = "1.0", features = ["full"] }
clap = { version = "4.0", features = ["derive", "env"] }
Expand All @@ -15,6 +16,7 @@ sqlite-vec = "0.1"
tokio-rusqlite.workspace = true
chrono = "0.4"
twitter-v2 = "0.1.8"

[[example]]
name = "main"
path = "src/main.rs"
6 changes: 2 additions & 4 deletions rina/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ use tokio_rusqlite::Connection;
#[derive(Parser)]
#[command(author, version, about, long_about = None)]
struct Args {
/// Clients to run
#[arg(long, env = "CLIENTS", default_value = "discord,twitter,telegram")]
clients: String,

/// Path to character profile TOML file
#[arg(long, default_value = "rina/src/characters/rina.toml")]
Expand Down Expand Up @@ -133,7 +130,8 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
args.twitter_cookie_string,
args.heurist_api_key,
).await?;
twitter.start().await?;

let clients = args.clients.split(',').collect::<Vec<&str>>();

tokio::join!(
telegram.start(),
Expand Down

0 comments on commit f84c0c8

Please sign in to comment.