diff --git a/Cargo.lock b/Cargo.lock index ac43a83..47796a0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1996,7 +1996,7 @@ checksum = "df94ce210e5bc13cb6651479fa48d14f601d9858cfe0467f43ae157023b938d3" [[package]] name = "payphone" -version = "4.4.11" +version = "4.4.12" dependencies = [ "anyhow", "async-trait", diff --git a/Cargo.toml b/Cargo.toml index 1a046b6..7e99a3b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "payphone" -version = "4.4.11" +version = "4.4.12" edition = "2024" default-run = "payphone" diff --git a/src/groups/about/commands.rs b/src/groups/about/commands.rs index 87e08a2..9c118b4 100644 --- a/src/groups/about/commands.rs +++ b/src/groups/about/commands.rs @@ -2,10 +2,13 @@ use async_trait::async_trait; use crate::{ extras::Extras, - framework::commands::{ - Command, CommandError, - arguments::{Arg, Argument, NeedyString, ParseArguments}, - context::CommandContext, + framework::{ + commands::{ + Command, CommandError, + arguments::{Arg, Argument, NeedyString, ParseArguments}, + context::CommandContext, + }, + runtime::Runtime, }, groups::{ about::{ @@ -78,3 +81,27 @@ impl Command for HelpCommand { Ok(()) } } + +#[derive(Debug)] +pub struct TetoCommand; + +#[async_trait] +impl Command for TetoCommand { + fn name(&self) -> &'static str { + "teto" + } + + fn show_in_help(&self, _rt: &Runtime, _extras: &Extras) -> bool { + false + } + + async fn execute( + &self, + ctx: CommandContext<'_, State, Extras>, + _args: &str, + ) -> Result<(), CommandError> { + ctx.send().content("GLORY TO TETOSLAVIA").await?; + + Ok(()) + } +} diff --git a/src/main.rs b/src/main.rs index 5fd7328..2cb571a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -136,7 +136,7 @@ use crate::{ runtime::Runtime, }, groups::{ - about::{commands::HelpCommand, components::HelpGoBackButton}, + about::{commands::{HelpCommand, TetoCommand}, components::HelpGoBackButton}, calls::{ commands::{ CallCommand, FriendRequestCommand, HangupCommand, MaskCommand, SkipCommand, @@ -293,6 +293,7 @@ async fn start( .intent(Intents::GUILD_MESSAGES) .intent(Intents::MESSAGE_CONTENT) .command(HelpCommand) + .command(TetoCommand) .command(CallCommand::new()) .command(SkipCommand) .command(HangupCommand)