Skip to content

Commit a8fbb5e

Browse files
committed
fix: skyblock missing profile handle
1 parent 41b02d7 commit a8fbb5e

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

api/src/skyblock/mod.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ pub const NAMES: &[&str] = &[
6767

6868
#[derive(Deserialize)]
6969
pub struct Response {
70-
pub profile: Profile,
70+
pub profile: Option<Profile>,
7171
}
7272

7373
impl Player {
@@ -96,6 +96,8 @@ impl Player {
9696

9797
let response = response.json::<Response>().await?;
9898

99-
Ok(response.profile)
99+
response
100+
.profile
101+
.ok_or_else(|| Error::SessionNotFound(profile.to_string()))
100102
}
101103
}

bin/emoji.rs

+1
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ pub const SPYGLASS: &str = "<:spyglass:1110754818433228991>";
55
pub const RECOVERY_COMPASS: &str = "<a:recovery_compass:1110755004463198218>";
66
pub const CLOCK: &str = "<a:clock:1110754973794451557>";
77
pub const BOOK_AND_QUILL: &str = "<:book_and_quill:1110754805724479569>";
8+
pub const GOLD_INGOT: &str = "<:gold_ingot:1112803224307630212>";

0 commit comments

Comments
 (0)