diff options
| author | mat <git@matdoes.dev> | 2026-05-06 18:38:23 -0545 |
|---|---|---|
| committer | mat <git@matdoes.dev> | 2026-05-07 08:05:58 -1200 |
| commit | cabc8b60a729ba17f5b75f7a7956c6d1ddcc8919 (patch) | |
| tree | 237fd12a9768fe7431ce42dfbdde60f4c7850e06 /azalea/examples/testbot/commands.rs | |
| parent | 9ffd0e80bbb3feace231553d6539124585b03e3c (diff) | |
| download | azalea-drasl-cabc8b60a729ba17f5b75f7a7956c6d1ddcc8919.tar.xz | |
azalea-brigadier now allows commands to return a Result
Diffstat (limited to 'azalea/examples/testbot/commands.rs')
| -rw-r--r-- | azalea/examples/testbot/commands.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/azalea/examples/testbot/commands.rs b/azalea/examples/testbot/commands.rs index 03705617..599c693d 100644 --- a/azalea/examples/testbot/commands.rs +++ b/azalea/examples/testbot/commands.rs @@ -11,7 +11,8 @@ use parking_lot::Mutex; use crate::State; -pub type Ctx = CommandContext<Mutex<CommandSource>>; +pub type Ctx = CommandContext<Mutex<CommandSource>, eyre::Result<i32>>; +pub type Dispatcher = CommandDispatcher<Mutex<CommandSource>, eyre::Result<i32>>; pub struct CommandSource { pub bot: Client, @@ -42,7 +43,7 @@ impl CommandSource { } } -pub fn register_commands(commands: &mut CommandDispatcher<Mutex<CommandSource>>) { +pub fn register_commands(commands: &mut Dispatcher) { combat::register(commands); debug::register(commands); movement::register(commands); |
