diff options
| author | mat <git@matdoes.dev> | 2023-08-25 02:34:31 -0500 |
|---|---|---|
| committer | mat <git@matdoes.dev> | 2023-08-25 02:34:31 -0500 |
| commit | d5465cd28e43d48b3e913fdb1161eb907e4d80d0 (patch) | |
| tree | b0962ac1bd09b434c67296c038ef3b26245ce6d7 /azalea/examples/echo.rs | |
| parent | 9c31f8033f006d5f505ce97e359638d6c1136859 (diff) | |
| download | azalea-drasl-d5465cd28e43d48b3e913fdb1161eb907e4d80d0.tar.xz | |
add basic pathfinding test
Diffstat (limited to 'azalea/examples/echo.rs')
| -rwxr-xr-x | azalea/examples/echo.rs | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/azalea/examples/echo.rs b/azalea/examples/echo.rs index dbf56a31..01390982 100755 --- a/azalea/examples/echo.rs +++ b/azalea/examples/echo.rs @@ -18,16 +18,13 @@ async fn main() { pub struct State {} async fn handle(bot: Client, event: Event, _state: State) -> anyhow::Result<()> { - match event { - Event::Chat(m) => { - if let (Some(sender), content) = m.split_sender_and_content() { - if sender == bot.profile.name { - return Ok(()); // ignore our own messages - } - bot.chat(&content); - }; - } - _ => {} + if let Event::Chat(m) = event { + if let (Some(sender), content) = m.split_sender_and_content() { + if sender == bot.profile.name { + return Ok(()); // ignore our own messages + } + bot.chat(&content); + }; } Ok(()) |
