diff --git a/src/groups/moderation/components.rs b/src/groups/moderation/components.rs index 0a2f523..d620000 100644 --- a/src/groups/moderation/components.rs +++ b/src/groups/moderation/components.rs @@ -12,7 +12,7 @@ use crate::{ #[derive(Debug)] pub struct ArrowIncidentButton { - pub arrow: char, + pub arrow: &'static str, pub user_id: u64, pub go_to: Option, } diff --git a/src/groups/moderation/mod.rs b/src/groups/moderation/mod.rs index dad38a0..df2a8b0 100644 --- a/src/groups/moderation/mod.rs +++ b/src/groups/moderation/mod.rs @@ -33,7 +33,15 @@ pub(super) async fn get_incident_page( .embed(incident_embed(incident)) .component( ArrowIncidentButton { - arrow: '<', + arrow: "<<", + user_id, + go_to: if page_index > 0 { Some(0) } else { None }, + }, + 1, + ) + .component( + ArrowIncidentButton { + arrow: "<", user_id, go_to: if page_index > 0 { Some(page_index - 1) @@ -52,11 +60,23 @@ pub(super) async fn get_incident_page( ) .component( ArrowIncidentButton { - arrow: '>', + arrow: ">", user_id, go_to: incidents.get(page_index + 1).map(|_| page_index + 1), }, 1, + ) + .component( + ArrowIncidentButton { + arrow: ">>", + user_id, + go_to: if page_index + 1 < incidents.len() { + Some(incidents.len() - 1) + } else { + None + }, + }, + 1, ); if incident.r#type == UserIncidentType::Ban {