1
2
Fork 0
mirror of https://github.com/mat-1/azalea.git synced 2025-08-02 14:26: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 /// Send a command packet to the server. The `command` argument should not
/// include the slash at the front. /// 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) { pub fn send_command_packet(&self, command: &str) {
self.ecs.lock().send_event(SendChatKindEvent { self.ecs.lock().send_event(SendChatKindEvent {
entity: self.entity, entity: self.entity,
@ -165,8 +168,8 @@ impl Client {
/// Send a message in chat. /// Send a message in chat.
/// ///
/// ```rust,no_run /// ```rust,no_run
/// # use azalea_client::{Client, Event}; /// # use azalea_client::Client;
/// # async fn handle(bot: Client, event: Event) -> anyhow::Result<()> { /// # async fn example(bot: Client) -> anyhow::Result<()> {
/// bot.chat("Hello, world!"); /// bot.chat("Hello, world!");
/// # Ok(()) /// # 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 futures::future::{join_all, BoxFuture};
use parking_lot::{Mutex, RwLock}; use parking_lot::{Mutex, RwLock};
use tokio::sync::mpsc; use tokio::sync::mpsc;
use tracing::error; use tracing::{debug, error};
use crate::{BoxHandleFn, DefaultBotPlugins, HandleFn, JoinOpts, NoState, StartError}; use crate::{BoxHandleFn, DefaultBotPlugins, HandleFn, JoinOpts, NoState, StartError};
@ -362,6 +362,8 @@ where
"There must be exactly one state per bot." "There must be exactly one state per bot."
); );
debug!("Starting Azalea {}", env!("CARGO_PKG_VERSION"));
// convert the TryInto<ServerAddress> into a ServerAddress // convert the TryInto<ServerAddress> into a ServerAddress
let address = match address.try_into() { let address = match address.try_into() {
Ok(address) => address, Ok(address) => address,