Skip to content

Commit

Permalink
Fix an error
Browse files Browse the repository at this point in the history
  • Loading branch information
anstadnik committed May 4, 2024
1 parent eca5758 commit 9376f75
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions bot/src/bot/dialogue/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use crate::bot::{FABot, FADialogue};
use crate::{DataGetState, DATA, REDIS_CONN, REDIS_USERS_SET_KEY};
use anyhow::{anyhow, Context, Error};
use first_aid_bot_core::prelude::*;
use redis::{aio::MultiplexedConnection, AsyncCommands};
use redis::AsyncCommands;
use teloxide::dispatching::DpHandlerDescription;
use teloxide::prelude::*;
use teloxide::types::ParseMode::Html;
Expand Down Expand Up @@ -109,11 +109,7 @@ pub fn get_commands_branch() -> FAHandler {
}

pub fn get_maintainer_commands_branch() -> FAHandler {
dptree::filter(
|msg: Message, _bot: FABot, _data: &'static Data, _conn: MultiplexedConnection| {
cfg!(debug_assertions) || is_admin(&msg)
},
)
.filter_command::<MaintainerCommands>()
.endpoint(maintainer_commands_handler)
dptree::filter(|msg: Message, _bot: FABot| cfg!(debug_assertions) || is_admin(&msg))
.filter_command::<MaintainerCommands>()
.endpoint(maintainer_commands_handler)
}

0 comments on commit 9376f75

Please sign in to comment.