Skip to content

Commit

Permalink
pre-mod groups
Browse files Browse the repository at this point in the history
  • Loading branch information
orzklv committed Nov 17, 2023
1 parent 5b034dc commit 21d0161
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
5 changes: 5 additions & 0 deletions rustfmt.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# unstable_features = true
# format_strings = true
# imports_granularity = "Crate"
# merge_imports = true
max_width = 100
9 changes: 4 additions & 5 deletions src/functions/groups.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use teloxide::{
types::{InlineKeyboardMarkup, ParseMode},
};

static TEXT: &str = r#"<b>Telegramdagi Rust Hamjamiyatlari yoki Guruhlari:</b>\nAgar o'zingizni guruhingizni qo'shmoqchi bo'lsangiz, bizni <a href='https://github.com/rust-lang-uz/rustina/blob/main/communities.json'>community.json</a> ni yangilang!"#;
static TEXT: &str = "<b>Telegramdagi Rust Hamjamiyatlari yoki Guruhlari:</b>\nAgar o'zingizni guruhingizni qo'shmoqchi bo'lsangiz, bizni <a href='https://github.com/rust-lang-uz/rustina/blob/main/communities.json'>community.json</a> ni yangilang!";

pub fn keyboard() -> InlineKeyboardMarkup {
let mut keyboard = Keyboard::new();
Expand All @@ -30,11 +30,10 @@ pub async fn callback(bot: &Bot, q: &CallbackQuery, args: &Vec<&str>) -> Respons
.reply_markup(keyboard())
.await?;
} else if let Some(id) = q.inline_message_id.clone() {
bot.edit_message_text_inline(id, "Oopsie, something went wrong...").await?;
bot.edit_message_text_inline(id, "Oopsie, something went wrong...")
.await?;
}
}



Ok(())
}
}
4 changes: 2 additions & 2 deletions src/functions/mod.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
pub mod about;
pub mod groups;
pub mod help;
pub mod inline;
pub mod rules;
pub mod start;
pub mod groups;

pub use inline::inline;

Expand Down Expand Up @@ -40,7 +40,7 @@ pub async fn callback(bot: Bot, q: CallbackQuery) -> Result<(), Box<dyn Error +

let _ = match args[0] {
"group" => crate::functions::groups::callback(&bot, &q, &args).await,
_ => Ok(())
_ => Ok(()),
};
}

Expand Down

0 comments on commit 21d0161

Please sign in to comment.