diff --git a/src/command.rs b/src/command.rs index 7dcb724..b31e26e 100644 --- a/src/command.rs +++ b/src/command.rs @@ -3,7 +3,7 @@ use std::{error::Error, sync::Arc}; use teloxide::{prelude::*, types::Me, utils::command::BotCommands}; use tracing::error; -use crate::{bot::InstanceState, commands::{calendario_academico::calendario_academico, comunidades_it::comunidades_it, get_siu_info::get_siu_info, hacer_algo::hacer_algo, links_utiles::links_utiles, mails_de_escuela::get_mails_de_escuela}, models::errors::BotErrors}; +use crate::{bot::InstanceState, commands::{calendario_academico::calendario_academico, comunidades_it::comunidades_it, get_siu_info::get_siu_info, hacer_algo::hacer_algo, links_utiles::links_utiles, mails_de_escuela::get_mails_de_escuela, roadmap::roadmap}, models::errors::BotErrors}; /// Enumeration of commands accepted by the bot. #[derive(BotCommands, Clone)] @@ -19,6 +19,8 @@ pub enum Command { Help, #[command(description = "Hace algo")] HacerAlgo, + #[command(description = "Muestra el link de la imagen del roadmap de la carrera")] + Roadmap, #[command(description = "Devuelve una lista de links")] Links, #[command(description = "Lista las comunidades IT que tenemos")] @@ -44,6 +46,7 @@ impl Command { let response = match cmd { Command::Help => help(&msg, &bot).await, Command::HacerAlgo => hacer_algo(&msg, &bot).await, + Command::Roadmap => roadmap(&msg, &bot).await, Command::Links => links_utiles(&msg, &bot).await, Command::CalendarioAcademico => calendario_academico(&msg, &bot).await, Command::SIU => get_siu_info(&msg, &bot).await, diff --git a/src/commands/mod.rs b/src/commands/mod.rs index 2d81450..3089c8a 100644 --- a/src/commands/mod.rs +++ b/src/commands/mod.rs @@ -3,4 +3,5 @@ pub mod links_utiles; pub mod calendario_academico; pub mod get_siu_info; pub mod comunidades_it; -pub mod mails_de_escuela; \ No newline at end of file +pub mod mails_de_escuela; +pub mod roadmap; \ No newline at end of file diff --git a/src/commands/roadmap.rs b/src/commands/roadmap.rs new file mode 100644 index 0000000..9116846 --- /dev/null +++ b/src/commands/roadmap.rs @@ -0,0 +1,11 @@ +use teloxide::{requests::Requester, types::Message, Bot}; + +use crate::models::errors::BotErrors; + + +pub async fn roadmap(msg: &Message, bot: &Bot) -> Result<(), BotErrors> { + bot.send_message(msg.chat.id, "https://i.ibb.co/yB15FSW/Programa.jpg").await?; + println!("enviando link imagen"); + + Ok(()) +} \ No newline at end of file