Add code of conduct link button to help command
This commit is contained in:
@@ -26,6 +26,7 @@ impl Button<State> for HelpGoBackButton {
|
|||||||
.component(HelpWebsiteLinkButton, 1)
|
.component(HelpWebsiteLinkButton, 1)
|
||||||
.component(HelpSupportLinkButton, 1)
|
.component(HelpSupportLinkButton, 1)
|
||||||
.component(HelpDonateLinkButton, 1)
|
.component(HelpDonateLinkButton, 1)
|
||||||
|
.component(CodeOfConductLinkButton, 1)
|
||||||
.await
|
.await
|
||||||
.inspect_err(|e| log::error!("An error occurred while attempting to edit the original message of an interaction. {e:?}"))
|
.inspect_err(|e| log::error!("An error occurred while attempting to edit the original message of an interaction. {e:?}"))
|
||||||
.map_err(
|
.map_err(
|
||||||
@@ -77,3 +78,17 @@ impl Button<State> for HelpDonateLinkButton {
|
|||||||
Some("https://ko-fi.com/payphonedev")
|
Some("https://ko-fi.com/payphonedev")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(Debug)]
|
||||||
|
pub struct CodeOfConductLinkButton;
|
||||||
|
|
||||||
|
#[async_trait]
|
||||||
|
impl Button<State> 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")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user