mirror of
https://github.com/mat-1/azalea.git
synced 2024-09-19 14:42:32 +00:00
add OWNER_USERNAME to testbot
This commit is contained in:
parent
038807e607
commit
87658ac486
1 changed files with 3 additions and 1 deletions
|
@ -28,6 +28,8 @@ use std::time::Duration;
|
|||
|
||||
const USERNAME: &str = "azalea";
|
||||
const ADDRESS: &str = "localhost";
|
||||
/// The bot will only listen to commands sent by the player with this username.
|
||||
const OWNER_USERNAME: &str = "py5";
|
||||
/// Whether the bot should run /particle a ton of times to show where it's
|
||||
/// pathfinding to. You should only have this on if the bot has operator
|
||||
/// permissions, otherwise it'll just spam the server console unnecessarily.
|
||||
|
@ -127,7 +129,7 @@ async fn handle(bot: Client, event: azalea::Event, state: State) -> anyhow::Resu
|
|||
let (Some(username), content) = chat.split_sender_and_content() else {
|
||||
return Ok(());
|
||||
};
|
||||
if username != "py5" {
|
||||
if username != OWNER_USERNAME {
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue