Checkpoint

This commit is contained in:
2026-03-07 19:27:40 -03:00
parent d0b5f86740
commit 21678239b5
50 changed files with 599 additions and 506 deletions
+58 -27
View File
@@ -1,29 +1,18 @@
use async_trait::async_trait;
use crate::{
extras::Extras,
framework::{
commands::{
Command, CommandError,
arguments::{Arg, Argument, NeedyString, ParseArguments},
context::CommandContext,
},
runtime::Runtime,
},
groups::{
about::{
components::{
HelpDonateLinkButton, HelpGoBackButton, HelpSupportLinkButton,
HelpWebsiteLinkButton,
},
embeds::{
get_all_command_help_embed, get_command_help_embed, get_command_not_found_embed,
},
},
calls::components::CodeOfConductButton,
},
state::State,
use crate::extras::Extras;
use crate::framework::commands::arguments::{Arg, Argument, NeedyString, ParseArguments};
use crate::framework::commands::context::CommandContext;
use crate::framework::commands::{Command, CommandError};
use crate::framework::runtime::Runtime;
use crate::groups::about::components::{
HelpDonateLinkButton, HelpGoBackButton, HelpSupportLinkButton, HelpWebsiteLinkButton,
};
use crate::groups::about::embeds::{
get_all_command_help_embed, get_command_help_embed, get_command_not_found_embed,
};
use crate::groups::calls::components::CodeOfConductButton;
use crate::state::State;
#[derive(Debug)]
pub struct HelpCommand;
@@ -83,12 +72,20 @@ impl Command<State, Extras> for HelpCommand {
}
#[derive(Debug)]
pub struct TetoCommand;
pub struct CodeOfConductCommand;
#[async_trait]
impl Command<State, Extras> for TetoCommand {
impl Command<State, Extras> for CodeOfConductCommand {
fn name(&self) -> &'static str {
"teto"
"codeofconduct"
}
fn aliases(&self) -> &'static [&'static str] {
&["coc"]
}
fn description(&self) -> &'static str {
"Shows a link to Payphone's Code of Conduct."
}
fn show_in_help(&self, _rt: &Runtime<State, Extras>, _extras: &Extras) -> bool {
@@ -100,7 +97,41 @@ impl Command<State, Extras> for TetoCommand {
ctx: CommandContext<'_, State, Extras>,
_args: &str,
) -> Result<(), CommandError> {
ctx.send().content("GLORY TO TETOSLAVIA").await?;
ctx.send()
.content("https://payphone.lat/code-of-conduct")
.await?;
Ok(())
}
}
#[derive(Debug)]
pub struct DonateCommand;
#[async_trait]
impl Command<State, Extras> for DonateCommand {
fn name(&self) -> &'static str {
"donate"
}
fn aliases(&self) -> &'static [&'static str] {
&["d"]
}
fn description(&self) -> &'static str {
"Shows a link to Payphone's Ko-Fi page."
}
fn show_in_help(&self, _rt: &Runtime<State, Extras>, _extras: &Extras) -> bool {
false
}
async fn execute(
&self,
ctx: CommandContext<'_, State, Extras>,
_args: &str,
) -> Result<(), CommandError> {
ctx.send().content("https://ko-fi.com/payphonedev").await?;
Ok(())
}