diff --git a/README.md b/README.md index 645627b..f853728 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ Main lib used : [serenity-rs/serenity](https://github.com/serenity-rs/serenity) - [DONE] ImageWareHouse (like TestDiscord) - ImageWareHouse V2 - - Mise en place d'autre source de gif OPT + - Mise en place d'autre source de gif comme [Teno](https://developers.google.com/tenor/guides/quickstart?hl=fr) - SoundBoard (like UnlabeledBot) - Notification (read an event topic and send the message to the expected chan) - Some Administration command @@ -24,9 +24,9 @@ Main lib used : [serenity-rs/serenity](https://github.com/serenity-rs/serenity) - Monitor the bot - Authentification Discord - Detecter controle -- [WIP] Integrate with the Opentelemetry project -- The bot has to be able to be deployed on a k8s cluster -- The bot has to be OPT-IN (the user has to enable the bot on his server with a command) +- [DONE] Integrate with the Opentelemetry project +- [DONE] The bot has to be able to be deployed on a k8s cluster +- [DONE] The bot has to be OPT-IN (the user has to enable the bot on his server with a command) - Mise en place de metric OpenTelemetry ## previous project diff --git a/src/botv2/init.rs b/src/botv2/init.rs index ea65285..d2788c6 100644 --- a/src/botv2/init.rs +++ b/src/botv2/init.rs @@ -9,7 +9,7 @@ use serenity::GatewayIntents; use std::fs; use std::sync::Arc; use tokio::sync::oneshot; -use tracing::{info, instrument}; +use tracing::info; use super::cmd::concour::main::concour; @@ -24,18 +24,6 @@ pub struct Data { pub type Error = Box; pub type Context<'a> = poise::Context<'a, Data, Error>; -#[instrument(skip(ctx), level = "info")] -#[poise::command(slash_command, prefix_command)] -async fn age( - ctx: Context<'_>, - #[description = "Selected user"] user: Option, -) -> Result<(), Error> { - let u = user.as_ref().unwrap_or_else(|| ctx.author()); - let response = format!("{}'s account was created at {}", u.name, u.created_at()); - ctx.say(response).await?; - Ok(()) -} - pub async fn start_bot( config: Config, rx: oneshot::Receiver<()>, @@ -67,7 +55,7 @@ pub async fn start_bot( let prefix = config.prefix.clone(); let framework = poise::Framework::builder() .options(poise::FrameworkOptions { - commands: vec![age(), ping(), help(), meme(), server(), concour()], + commands: vec![ping(), help(), meme(), server(), concour()], prefix_options: poise::PrefixFrameworkOptions { prefix: Some(prefix), ..Default::default()