summaryrefslogtreecommitdiff
path: root/src/commands.rs
diff options
context:
space:
mode:
authorSanto Cariotti <santo@dcariotti.me>2021-08-05 20:32:45 +0200
committerSanto Cariotti <santo@dcariotti.me>2021-08-05 20:32:45 +0200
commit0ef059378e3b10c0eebcbb4e5abc0e033f06cd25 (patch)
treea9e5761039205bf132a61f46f35fdd0c260902ee /src/commands.rs
parenteaafe83dae4c12d44c9c7672a3b02c04b110cf6b (diff)
chore: get chat_id to create the button for callback
Diffstat (limited to 'src/commands.rs')
-rw-r--r--src/commands.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/commands.rs b/src/commands.rs
index 512e3c1..b03e1c6 100644
--- a/src/commands.rs
+++ b/src/commands.rs
@@ -3,7 +3,7 @@ use crate::config::Config;
use crate::keyboard::make_inline_keyboard;
use std::error::Error;
use teloxide::payloads::SendMessageSetters;
-use teloxide::prelude::{AutoSend, Bot, Message, UpdateWithCx};
+use teloxide::prelude::{AutoSend, Bot, GetChatId, Message, UpdateWithCx};
use teloxide::utils::command::BotCommand;
#[derive(BotCommand)]
@@ -54,7 +54,7 @@ pub async fn handler(
faculties = browser::get_faculties().await.unwrap();
}
- let keyboard = make_inline_keyboard(&faculties, "faculty").await;
+ let keyboard = make_inline_keyboard(&faculties, "faculty", cx.chat_id()).await;
cx.answer("Where?").reply_markup(keyboard).await?;
}
}