From 8ff7e3af0253d950f7a29054f3d0b47a7363e98b Mon Sep 17 00:00:00 2001 From: Rafael Bradley Date: Mon, 18 Aug 2025 19:33:29 -0300 Subject: [PATCH] Add code of conduct link button to help command --- src/groups/about/components.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/groups/about/components.rs b/src/groups/about/components.rs index bac775c..4d9ca4d 100644 --- a/src/groups/about/components.rs +++ b/src/groups/about/components.rs @@ -26,6 +26,7 @@ impl Button for HelpGoBackButton { .component(HelpWebsiteLinkButton, 1) .component(HelpSupportLinkButton, 1) .component(HelpDonateLinkButton, 1) + .component(CodeOfConductLinkButton, 1) .await .inspect_err(|e| log::error!("An error occurred while attempting to edit the original message of an interaction. {e:?}")) .map_err( @@ -77,3 +78,17 @@ impl Button for HelpDonateLinkButton { Some("https://ko-fi.com/payphonedev") } } + +#[derive(Debug)] +pub struct CodeOfConductLinkButton; + +#[async_trait] +impl Button for CodeOfConductLinkButton { + fn label(&self) -> Option<&'static str> { + Some("Code of Conduct") + } + + fn url(&self) -> Option<&'static str> { + Some("https://payphone.lat/code-of-conduct") + } +}