aboutsummaryrefslogtreecommitdiff
path: root/azalea/examples/echo.rs
diff options
context:
space:
mode:
Diffstat (limited to 'azalea/examples/echo.rs')
-rw-r--r--azalea/examples/echo.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/azalea/examples/echo.rs b/azalea/examples/echo.rs
index 01390982..1e773b7d 100644
--- a/azalea/examples/echo.rs
+++ b/azalea/examples/echo.rs
@@ -20,7 +20,7 @@ pub struct State {}
async fn handle(bot: Client, event: Event, _state: State) -> anyhow::Result<()> {
if let Event::Chat(m) = event {
if let (Some(sender), content) = m.split_sender_and_content() {
- if sender == bot.profile.name {
+ if sender == bot.username() {
return Ok(()); // ignore our own messages
}
bot.chat(&content);