-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
10 additions
and
10 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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>; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 { | ||
|
@@ -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(); | ||
} | ||
} | ||
|