create buttons_markup macro
This commit is contained in:
parent
e33ccc48b3
commit
f09fc42546
14
src/utils.rs
14
src/utils.rs
@ -28,6 +28,20 @@ macro_rules! stacked_buttons_markup {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[macro_export]
|
||||||
|
macro_rules! buttons_markup {
|
||||||
|
($( $buttons:expr ),+) => {
|
||||||
|
InlineKeyboardMarkup {
|
||||||
|
inline_keyboard: vec![
|
||||||
|
$(
|
||||||
|
//$buttons.into_iter().collect::<Vec<_>>(),
|
||||||
|
$buttons.to_vec(),
|
||||||
|
)*
|
||||||
|
],
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
pub async fn create_callback_button<C, D>(
|
pub async fn create_callback_button<C, D>(
|
||||||
literal: &str,
|
literal: &str,
|
||||||
callback: C,
|
callback: C,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user