fixed select menu taking more than 25 items

This commit is contained in:
2022-02-25 19:22:38 +05:30
parent c04ec75f3e
commit 05dc40863e
3 changed files with 10 additions and 4 deletions

View File

@@ -54,7 +54,9 @@ pub fn make_terminal_components(terminal: &str, pages: usize) -> CreateComponent
.emoji(ReactionType::Unicode("\u{1F5D1}".to_string()))
.custom_id("delete")
})
})
.create_action_row(|ar| ar.add_select_menu(make_range_select_menu(1, pages)));
});
if pages <= 25 {
c.create_action_row(|ar| ar.add_select_menu(make_range_select_menu(1, pages)));
}
c
}