create buttons_markup macro

This commit is contained in:
Akulij 2025-05-02 17:45:33 +03:00
parent e33ccc48b3
commit f09fc42546

View File

@ -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,