1
2
Fork 0
mirror of https://github.com/mat-1/azalea.git synced 2025-08-02 06:16:04 +00:00

debug log CARGO_PKG_VERSION on swarm start

This commit is contained in:
mat 2025-02-22 21:52:23 +00:00
parent 74b52a1fc1
commit 444993b609
2 changed files with 8 additions and 3 deletions

View file

@ -153,6 +153,9 @@ impl Client {
/// Send a command packet to the server. The `command` argument should not
/// include the slash at the front.
///
/// You can also just use [`Client::chat`] and start your message with a `/`
/// to send a command.
pub fn send_command_packet(&self, command: &str) {
self.ecs.lock().send_event(SendChatKindEvent {
entity: self.entity,
@ -165,8 +168,8 @@ impl Client {
/// Send a message in chat.
///
/// ```rust,no_run
/// # use azalea_client::{Client, Event};
/// # async fn handle(bot: Client, event: Event) -> anyhow::Result<()> {
/// # use azalea_client::Client;
/// # async fn example(bot: Client) -> anyhow::Result<()> {
/// bot.chat("Hello, world!");
/// # Ok(())
/// # }

View file

@ -19,7 +19,7 @@ use bevy_ecs::{component::Component, entity::Entity, system::Resource, world::Wo
use futures::future::{join_all, BoxFuture};
use parking_lot::{Mutex, RwLock};
use tokio::sync::mpsc;
use tracing::error;
use tracing::{debug, error};
use crate::{BoxHandleFn, DefaultBotPlugins, HandleFn, JoinOpts, NoState, StartError};
@ -362,6 +362,8 @@ where
"There must be exactly one state per bot."
);
debug!("Starting Azalea {}", env!("CARGO_PKG_VERSION"));
// convert the TryInto<ServerAddress> into a ServerAddress
let address = match address.try_into() {
Ok(address) => address,