diff options
Diffstat (limited to 'azalea/src/lib.rs')
| -rw-r--r-- | azalea/src/lib.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/azalea/src/lib.rs b/azalea/src/lib.rs index a7d0791a..2d0344fc 100644 --- a/azalea/src/lib.rs +++ b/azalea/src/lib.rs @@ -123,6 +123,8 @@ where pub enum Error { #[error("Invalid address")] InvalidAddress, + #[error("Join error: {0}")] + Join(#[from] azalea_client::JoinError), } /// Join a server and start handling events. This function will run forever until @@ -151,7 +153,7 @@ pub async fn start< Err(_) => return Err(Error::InvalidAddress), }; - let (bot, mut rx) = Client::join(&options.account, address).await.unwrap(); + let (bot, mut rx) = Client::join(&options.account, address).await?; let state = options.state; let bot_plugin = bot::Plugin::default(); |
