Add teto command
This commit is contained in:
Generated
+1
-1
@@ -1996,7 +1996,7 @@ checksum = "df94ce210e5bc13cb6651479fa48d14f601d9858cfe0467f43ae157023b938d3"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "payphone"
|
name = "payphone"
|
||||||
version = "4.4.11"
|
version = "4.4.12"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"async-trait",
|
"async-trait",
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "payphone"
|
name = "payphone"
|
||||||
version = "4.4.11"
|
version = "4.4.12"
|
||||||
edition = "2024"
|
edition = "2024"
|
||||||
default-run = "payphone"
|
default-run = "payphone"
|
||||||
|
|
||||||
|
|||||||
@@ -2,10 +2,13 @@ use async_trait::async_trait;
|
|||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
extras::Extras,
|
extras::Extras,
|
||||||
framework::commands::{
|
framework::{
|
||||||
Command, CommandError,
|
commands::{
|
||||||
arguments::{Arg, Argument, NeedyString, ParseArguments},
|
Command, CommandError,
|
||||||
context::CommandContext,
|
arguments::{Arg, Argument, NeedyString, ParseArguments},
|
||||||
|
context::CommandContext,
|
||||||
|
},
|
||||||
|
runtime::Runtime,
|
||||||
},
|
},
|
||||||
groups::{
|
groups::{
|
||||||
about::{
|
about::{
|
||||||
@@ -78,3 +81,27 @@ impl Command<State, Extras> for HelpCommand {
|
|||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(Debug)]
|
||||||
|
pub struct TetoCommand;
|
||||||
|
|
||||||
|
#[async_trait]
|
||||||
|
impl Command<State, Extras> for TetoCommand {
|
||||||
|
fn name(&self) -> &'static str {
|
||||||
|
"teto"
|
||||||
|
}
|
||||||
|
|
||||||
|
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("GLORY TO TETOSLAVIA").await?;
|
||||||
|
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
+2
-1
@@ -136,7 +136,7 @@ use crate::{
|
|||||||
runtime::Runtime,
|
runtime::Runtime,
|
||||||
},
|
},
|
||||||
groups::{
|
groups::{
|
||||||
about::{commands::HelpCommand, components::HelpGoBackButton},
|
about::{commands::{HelpCommand, TetoCommand}, components::HelpGoBackButton},
|
||||||
calls::{
|
calls::{
|
||||||
commands::{
|
commands::{
|
||||||
CallCommand, FriendRequestCommand, HangupCommand, MaskCommand, SkipCommand,
|
CallCommand, FriendRequestCommand, HangupCommand, MaskCommand, SkipCommand,
|
||||||
@@ -293,6 +293,7 @@ async fn start(
|
|||||||
.intent(Intents::GUILD_MESSAGES)
|
.intent(Intents::GUILD_MESSAGES)
|
||||||
.intent(Intents::MESSAGE_CONTENT)
|
.intent(Intents::MESSAGE_CONTENT)
|
||||||
.command(HelpCommand)
|
.command(HelpCommand)
|
||||||
|
.command(TetoCommand)
|
||||||
.command(CallCommand::new())
|
.command(CallCommand::new())
|
||||||
.command(SkipCommand)
|
.command(SkipCommand)
|
||||||
.command(HangupCommand)
|
.command(HangupCommand)
|
||||||
|
|||||||
Reference in New Issue
Block a user