diff options
Diffstat (limited to 'azalea/examples/testbot/main.rs')
| -rw-r--r-- | azalea/examples/testbot/main.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/azalea/examples/testbot/main.rs b/azalea/examples/testbot/main.rs index f5f6c096..57bdcc72 100644 --- a/azalea/examples/testbot/main.rs +++ b/azalea/examples/testbot/main.rs @@ -73,8 +73,8 @@ async fn main() -> AppExit { builder .join_delay(Duration::from_millis(100)) .set_swarm_state(SwarmState { - args, - commands: Arc::new(commands), + args: args.into(), + commands: commands.into(), }) // .add_plugins(mspt::MsptPlugin) .start(join_address) @@ -128,11 +128,11 @@ impl State { #[derive(Clone, Default, Resource)] struct SwarmState { - pub args: Args, + pub args: Arc<Args>, pub commands: Arc<CommandDispatcher<Mutex<CommandSource>>>, } -async fn handle(bot: Client, event: azalea::Event, state: State) -> anyhow::Result<()> { +async fn handle(bot: Client, event: azalea::Event, state: State) -> eyre::Result<()> { let swarm = bot.resource::<SwarmState>(); match event { @@ -201,7 +201,7 @@ async fn handle(bot: Client, event: azalea::Event, state: State) -> anyhow::Resu Ok(()) } -async fn swarm_handle(_swarm: Swarm, event: SwarmEvent, _state: SwarmState) -> anyhow::Result<()> { +async fn swarm_handle(_swarm: Swarm, event: SwarmEvent, _state: SwarmState) -> eyre::Result<()> { match &event { SwarmEvent::Disconnect(account, _join_opts) => { println!("bot got kicked! {}", account.username()); |
