Skip to content

Commit

Permalink
0.2.1 - Successful RPC Message
Browse files Browse the repository at this point in the history
  • Loading branch information
ShayBox committed Aug 7, 2023
1 parent ebf5524 commit 9b0c030
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "vrc-log"
version = "0.2.0"
version = "0.2.1"
authors = ["Shayne Hartford <[email protected]>"]
edition = "2021"
description = "VRChat Local Cache Avatar ID Logger"
Expand Down
6 changes: 0 additions & 6 deletions src/provider/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,6 @@ pub mod prelude;
pub mod ravenwood;
pub mod sqlite;

pub const USER_AGENT: &str = concat!(
"VRC-LOG/",
env!("CARGO_PKG_VERSION"),
" [email protected]"
);

pub trait Provider {
fn send_avatar_id(&self, avatar_id: &str) -> anyhow::Result<bool>;
}
Expand Down
8 changes: 7 additions & 1 deletion src/provider/ravenwood.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,15 @@ use reqwest::blocking::Client;
use serde::{Deserialize, Serialize};
use serde_json::Value;

use crate::provider::{Provider, USER_AGENT};
use crate::provider::Provider;

const CLIENT_ID: u64 = 1137885877918502923;
const USER_ID: &str = "358558305997684739";
const USER_AGENT: &str = concat!(
"VRC-LOG/",
env!("CARGO_PKG_VERSION"),
" [email protected]"
);

#[derive(Deserialize, Serialize)]
pub struct RavenwoodResponse {
Expand Down Expand Up @@ -43,6 +48,7 @@ impl Default for Ravenwood {
if let Some(event) = ctx.event.as_object() {
if let Some(user) = event.get("user").and_then(Value::as_object) {
if let Some(id) = user.get("id").and_then(Value::as_str) {
println!("[Ravenwood] Got your Discord ID: {id}");
*discord_id_rpc.write().unwrap() = id.to_owned();
}
}
Expand Down

0 comments on commit 9b0c030

Please sign in to comment.