Skip to content

Commit

Permalink
move data to data folder
Browse files Browse the repository at this point in the history
  • Loading branch information
orzklv committed Nov 20, 2023
1 parent 324ca7b commit bba354b
Show file tree
Hide file tree
Showing 7 changed files with 4 additions and 4 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/functions/groups.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use teloxide::{
types::{InlineKeyboardMarkup, ParseMode},
};

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!";
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/data/communities.json'>community.json</a> ni yangilang!";

pub async fn command(bot: &Bot, msg: &Message, groups: &Groups) -> ResponseResult<()> {
bot.send_message(msg.chat.id, TEXT)
Expand Down
2 changes: 1 addition & 1 deletion src/functions/useful.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use teloxide::{

static TEXT: &str = "<b>Rustga oid foydali materiallar:</b>\n\
Agar o'zingizdan material qo'shmoqchi bo'lsangiz, bizni \
<a href='https://github.com/rust-lang-uz/rustina/blob/main/source.json'>\
<a href='https://github.com/rust-lang-uz/rustina/blob/main/data/source.json'>\
source.json</a> ni yangilang!";

pub async fn command(bot: &Bot, msg: &Message, resources: &Resources) -> ResponseResult<()> {
Expand Down
2 changes: 1 addition & 1 deletion src/utils/groups.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use serde::{Deserialize, Serialize};

static GROUPS: &str = include_str!("../../communities.json");
static GROUPS: &str = include_str!("../../data/communities.json");

#[derive(Serialize, Deserialize, Clone, Debug)]
pub struct Group {
Expand Down
2 changes: 1 addition & 1 deletion src/utils/resources.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use serde::{Deserialize, Serialize};
use std::collections::HashMap;

static RESOURCE: &str = include_str!("../../source.json");
static RESOURCE: &str = include_str!("../../data/source.json");

#[derive(Serialize, Deserialize, Clone, Debug)]
pub struct Resource {
Expand Down

0 comments on commit bba354b

Please sign in to comment.