Richer player profiles, launcher command guide, integration docs
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DjMbLQujBHunCCu5GpsHaT
This commit is contained in:
13 files changed
+655
-13
No files matched your search
@@ -712,6 +712,36 @@ pub struct UserPost {
|
||||
pub created_at: String,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Default)]
|
||||
pub struct ProfileGuild {
|
||||
pub id: String,
|
||||
pub name: String,
|
||||
pub tag: String,
|
||||
pub role: String,
|
||||
}
|
||||
|
||||
/// A rank reported by a server's permissions plugin (LuckPerms), shown read-only.
|
||||
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Default)]
|
||||
pub struct ProfileRank {
|
||||
pub display: String,
|
||||
pub prefix: String,
|
||||
pub server_name: String,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Default)]
|
||||
pub struct ProfileActivity {
|
||||
/// `join`, `death`, `advancement`, `kill` or `achievement`.
|
||||
pub kind: String,
|
||||
pub text: String,
|
||||
pub at: String,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Default)]
|
||||
pub struct MutualFriend {
|
||||
pub uuid: String,
|
||||
pub username: String,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Default)]
|
||||
pub struct UserProfileView {
|
||||
pub uuid: String,
|
||||
@@ -732,6 +762,32 @@ pub struct UserProfileView {
|
||||
pub friends_count: i64,
|
||||
pub created_at: String,
|
||||
pub stats: Option<serde_json::Value>,
|
||||
#[serde(default)]
|
||||
pub online: bool,
|
||||
#[serde(default)]
|
||||
pub last_seen: Option<String>,
|
||||
#[serde(default)]
|
||||
pub guild: Option<ProfileGuild>,
|
||||
#[serde(default)]
|
||||
pub rank: Option<ProfileRank>,
|
||||
/// The server they spend the most time on.
|
||||
#[serde(default)]
|
||||
pub favorite_server: Option<String>,
|
||||
/// Total balance across the economies they hold money in.
|
||||
#[serde(default)]
|
||||
pub wealth: f64,
|
||||
#[serde(default)]
|
||||
pub recent_activity: Vec<ProfileActivity>,
|
||||
#[serde(default)]
|
||||
pub mutual_friends: Vec<MutualFriend>,
|
||||
/// Relationship to the person looking: `self`, `none`, `accepted`, `pending_outgoing` or `pending_incoming`.
|
||||
#[serde(default)]
|
||||
pub relationship: String,
|
||||
/// Profile cosmetic: a `#rrggbb` accent colour.
|
||||
#[serde(default)]
|
||||
pub accent_color: Option<String>,
|
||||
#[serde(default)]
|
||||
pub discord_linked: bool,
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
Reference in new issue
Block a user