-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1100b78
commit 9b44a12
Showing
16 changed files
with
263 additions
and
45 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Declare ignored files that should be included in deployment: | ||
assets = [ | ||
"assets/*", # include all files and subdirs in static/ | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,143 @@ | ||
[ | ||
{ | ||
"url": "https://www.instagram.com/autoconvocadosuno/", | ||
"title": "Instagram GEA" | ||
}, | ||
{ | ||
"url": "https://www.facebook.com/autoconvocadosuno", | ||
"title": "Facebook GEA" | ||
}, | ||
{ | ||
"url": "https://www.instagram.com/genero_y_diversidad_gea/", | ||
"title": "Genero y Diversidad - Instagram" | ||
}, | ||
{ | ||
"url": "https://www.facebook.com/generoydiversidadgea", | ||
"title": "Genero y Diversidad - Facebook" | ||
}, | ||
{ | ||
"url": "https://www.facebook.com/cegresadosuno", | ||
"title": "Centro de Egresados" | ||
}, | ||
{ | ||
"url": "https://wa.me/5491133242915", | ||
"title": "Tutorias Administración" | ||
}, | ||
{ | ||
"url": "https://www.youtube.com/channel/UCxd-UFY6wChSTF7WJCCFz7g", | ||
"title": "Youtube GEA" | ||
}, | ||
{ | ||
"url": "https://docs.google.com/document/d/1E1Y8mML7hAQAJ_0C6RrXLYKjmFqNym4OATaAXUYJvYA/edit?usp=sharing", | ||
"title": "Tutorías Informática" | ||
}, | ||
{ | ||
"url": "https://docs.google.com/spreadsheets/d/1yIwkX-2vIMUAFnzGUT4LP2he41JGnovj0UIKqgqHweE/edit?usp=drivesdk", | ||
"title": "Tarjeta de Beneficios" | ||
}, | ||
{ | ||
"url": "https://docs.google.com/document/d/1H3S79xQP7XN_yMV-OJLq13wOExNfbtu2JU0rplCHRJQ/edit?usp=sharing", | ||
"title": "Tutorías Ingeniería" | ||
}, | ||
{ | ||
"url": "https://docs.google.com/document/d/18x3DSwftcavC-s6ukv2w_3z9bDOhpCHyyw9YVtWoOvY/edit?usp=drivesdk&fbclid=IwAR2uBq8Arzl_w-LN9j6hfactZg7FsjBCJwgnsZ8WcFgX9DmORW0UZfMIFvY", | ||
"title": "Grupos de la carrera - INFORMATICA" | ||
}, | ||
{ | ||
"url": "https://autogestion.uno.edu.ar/uno/", | ||
"title": "SIU Guarani" | ||
}, | ||
{ | ||
"url": "http://campusvirtual.uno.edu.ar/moodle/", | ||
"title": "Campus Virtual" | ||
}, | ||
{ | ||
"url": "https://docs.google.com/document/d/1OxtsP0X-j7xtzUXzaRUOV2JSIj0LwAZOGpcF-_7vX5I/edit?usp=sharing", | ||
"title": "Grupos de la carrera - ENFERMERIA" | ||
}, | ||
{ | ||
|
||
"url": "https://docs.google.com/document/d/10xNX9DHaG1tiYs42p2ltnTZ-UdvWHAxlx1uQqgvYg30/edit?usp=sharing", | ||
"title": "Grupos de la carrera - ADMINISTRACION" | ||
}, | ||
{ | ||
"url": "https://chat.whatsapp.com/GDllGTv7zBiGZQHlBapjR3", | ||
"title": "Grupo de la carrera - INFORMATICA" | ||
}, | ||
{ | ||
"url": "https://www.facebook.com/groups/informatica.uno.merlo", | ||
"title": "Grupo de la carrera - FACEBOOK" | ||
}, | ||
{ | ||
"url": "https://t.me/Informatica_UNO", | ||
"title": "Grupo de la carrera - INFORMATICA (telegram)" | ||
}, | ||
{ | ||
"url": "https://discord.gg/DgZnkwf", | ||
"title": "Discord de la carrera" | ||
}, | ||
{ | ||
"url": "https://t.me/gnuno_merlo", | ||
"title": "GNUno" | ||
}, | ||
{ | ||
"url": "https://chat.whatsapp.com/BV5aRoVPieZ9OKDzSiOd0M", | ||
"title": "Grupo de la carrera - QUIMICA" | ||
}, | ||
{ | ||
"url": "https://chat.whatsapp.com/BiQjWxHVnzqLRkD0olthhu?fbclid=IwAR3eGe2Gj0rmksYlJaW2ntTQyCDzfFJQGbgaojFp191LryuFu6dIWVCqx9o", | ||
"title": "Grupo de la carrera - ADM" | ||
}, | ||
{ | ||
"url": "https://wa.me/5491139154715", | ||
"title": "Enfermería 1ro" | ||
}, | ||
{ | ||
"url": "https://wa.me/5493885212445", | ||
"title": "Enfermería 2do y 3ro" | ||
}, | ||
{ | ||
"url": "https://wa.me/5491169364262", | ||
"title": "Sist. Contables y Conta 1" | ||
}, | ||
{ | ||
"url": "https://wa.me/5491133242915", | ||
"title": "Tutorías ADM" | ||
}, | ||
{ | ||
"url": "https://wa.me/5491156910849", | ||
"title": "Tutorias Mate 1 y 2" | ||
}, | ||
{ | ||
"url": "https://chat.whatsapp.com/FU5uDcZQBY4JrUYClg2Tgj", | ||
"title": "Ingles" | ||
}, | ||
{ | ||
"url": "https://drive.google.com/file/d/1BZP-SuGjH0kfXjkXCRwBaqim86I-8zb2/view?usp=drivesdk", | ||
"title": "Resolucion de Cursada Virtual" | ||
}, | ||
{ | ||
"url": "https://drive.google.com/file/d/0B41zO4qldC4eaHJ5OHFYWFp0UFk/view?usp=drivesdk", | ||
"title": "Estatuto del Centro de Estudiantes" | ||
}, | ||
{ | ||
"url": "https://drive.google.com/file/d/1OPWqtycr2VWqSKoAK1w7IeXs5wxk8A6M/view?usp=drivesdk", | ||
"title": "Protocolo de Genero" | ||
}, | ||
{ | ||
"url": "https://drive.google.com/file/d/0B2S9Bo8h-kwFSV92ZU5melNIbGM/view?usp=drivesdk", | ||
"title": "Reglamento de Ayudante de Catedra" | ||
}, | ||
{ | ||
"url": "https://drive.google.com/file/d/0B41zO4qldC4eSzZxWTdhMU45dkk/view?usp=drivesdk", | ||
"title": "Reglamento Electoral" | ||
}, | ||
{ | ||
"url": "https://drive.google.com/file/d/1GRgITeadkmpYh1lCa6DGYJXd0jeiKs_L/view?usp=drivesdk", | ||
"title": "Reglamento de Examenes Virtuales" | ||
}, | ||
{ | ||
"url": "https://drive.google.com/file/d/0B2S9Bo8h-kwFeEFIR19jWUpOdjQ/view?usp=drivesdk", | ||
"title": "Reglamento de Alumnos" | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
use teloxide::{requests::{Requester, ResponseResult}, types::Message, Bot}; | ||
|
||
|
||
pub async fn hacer_algo(msg: &Message, bot: &Bot) -> ResponseResult<()> { | ||
bot.send_message(msg.chat.id, "Hola mundo").await?; | ||
println!("Hola mundo"); | ||
|
||
Ok(()) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
use teloxide::{payloads::SendMessageSetters, requests::{Requester, ResponseResult}, types::Message, utils::markdown::escape, Bot, RequestError}; | ||
use teloxide::types::ParseMode::MarkdownV2; | ||
|
||
use crate::models::link::Link; | ||
use std::{fmt::Write, fs::read_to_string}; | ||
|
||
|
||
pub async fn links_utiles(msg: &Message, bot: &Bot) -> ResponseResult<()> { | ||
|
||
let content = read_to_string("assets/links.json")?; | ||
let links: Vec<Link> = serde_json::from_str(&content).map_err(|e|RequestError::InvalidJson { source: e, raw: content.into_boxed_str() })?; | ||
|
||
let mut message = "Estos son los links que tenemos:\n".to_string(); | ||
|
||
for link in &links[0..18] { | ||
let title = escape(&link.title); | ||
let url = escape(&link.url); | ||
|
||
let _ = writeln!(&mut message, "[{title}]({url})"); | ||
} | ||
bot.send_message(msg.chat.id, message).parse_mode(MarkdownV2).await?; | ||
|
||
Ok(()) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
pub mod hacer_algo; | ||
pub mod links_utiles; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
use teloxide::{Bot, types::ChatMemberUpdated, requests::{ResponseResult, Requester}, utils::html}; | ||
|
||
|
||
pub async fn left_chat_member(bot: Bot, chat_member: ChatMemberUpdated) -> ResponseResult<()> { | ||
let user = chat_member.old_chat_member.user; | ||
|
||
let username = user | ||
.mention() | ||
.unwrap_or_else(|| html::user_mention(user.id.0 as i64, user.full_name().as_str())); | ||
|
||
bot.send_message( | ||
chat_member.chat.id, | ||
format!("Hasta la proximaaaa {username}!"), | ||
) | ||
.await?; | ||
|
||
Ok(()) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
pub mod left_chat_member; | ||
pub mod new_chat_member; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
use teloxide::{Bot, types::ChatMemberUpdated, requests::{ResponseResult, Requester}, utils::html}; | ||
|
||
|
||
|
||
/// Welcome Endpoint | ||
pub async fn new_chat_member(bot: Bot, chat_member: ChatMemberUpdated) -> ResponseResult<()> { | ||
let user = chat_member.old_chat_member.user.clone(); | ||
|
||
let telegram_group_name = chat_member.chat.title().unwrap_or(""); | ||
|
||
// We get a "@username" mention via `mention()` method if the user has a | ||
// username, otherwise we create a textual mention with "Full Name" as the | ||
// text linking to the user | ||
let username = user | ||
.mention() | ||
.unwrap_or_else(|| html::user_mention(user.id.0 as i64, user.full_name().as_str())); | ||
|
||
bot.send_message(chat_member.chat.id, format!("Bienvenidx a {telegram_group_name}, un lugar horrible pero bueno, pasala bien {username}!")) | ||
.await?; | ||
|
||
Ok(()) | ||
} | ||
|
Oops, something went wrong.