redis publishing from last night

This commit is contained in:
Brandon Thomas committed 2021-03-09 01:25:26 -05:00
1 parent 1be8f77b60
commit 575003107f
2 files changed
+4 -2

No files matched your search

+2
View File
@@ -32,6 +32,8 @@ async fn main() -> anyhow::Result<()> {
let secrets = Secrets::from_file("secrets.toml")?;
let mut redis_client = RedisClient::new(&secrets.redis);
redis_client.connect().await?;
let mut twitch_client = TwitchClient::new(&secrets.twitch, redis_client);
loop {
+2 -2
View File
@@ -93,8 +93,8 @@ impl TwitchClient {
let channel = command.to_lowercase();
let username = msg.name().trim();
let command_payload= format!("{}|{}", username, remaining_message); // Payload: USERNAME|DATA
println!("Publish: {} - {}", channel, command_payload);
let _r = self.redis_client.publish(&channel, &command_payload).await;
println!("Publish: '{}' - '{}'", channel, command_payload);
let _r = self.redis_client.publish(&channel, &command_payload).await.expect("Should work");
}
},