Skip to content

Commit

Permalink
link to offtopic
Browse files Browse the repository at this point in the history
  • Loading branch information
orzklv committed Nov 20, 2023
1 parent ecbde67 commit 8b9f251
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/functions/offtop.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use teloxide::{prelude::*, types::*};
use crate::utils::keyboard::Keyboard;

static TEXT_FAIL: &str = "Ha-ha... yaxshi urinish!";
static TEXT_NON_REPLY: &str = "↪ Reply bilan ko'rsatingchi habarni!";
Expand Down Expand Up @@ -27,6 +28,7 @@ pub async fn command(bot: &Bot, msg: &Message, me: &Me) -> ResponseResult<()> {

bot.send_message(msg.chat.id, view(msg.reply_to_message().unwrap()))
.parse_mode(ParseMode::Html)
.reply_markup(keyboard())
.await?;

Ok(())
Expand All @@ -45,3 +47,8 @@ pub fn view(msg: &Message) -> String {
msg.from().unwrap().first_name
)
}

pub fn keyboard() -> InlineKeyboardMarkup {
let mut keyboard = Keyboard::new();
keyboard.url("Offtopic", "https://t.me/rustlanguz/9400")
}

0 comments on commit 8b9f251

Please sign in to comment.