Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions bathbot/src/active/impls/single_score.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,14 +169,17 @@ impl SingleScorePagination {
Err(err) => return ComponentResult::Err(err),
};

if user_id != self.msg_owner {
return ComponentResult::Ignore;
}
// Render and miss analyzer buttons are allowed to be pressed by
// anyone - not just the initial owner

match component.data.custom_id.as_str() {
"render" => self.handle_render_button(component).await,
"miss_analyzer" => self.handle_miss_analyzer_button(component).await,
_ => {
if user_id != self.msg_owner {
return ComponentResult::Ignore;
}

async_handle_pagination_component(component, self.msg_owner, false, &mut self.pages)
.await
.unwrap_or_else(ComponentResult::Err)
Expand Down