From bba354bb4a3d9817fe0fcfad33c13ebf49021be6 Mon Sep 17 00:00:00 2001 From: Sokhibjon Orzikulov Date: Mon, 20 Nov 2023 12:49:49 +0500 Subject: [PATCH] move data to data folder --- communities.json => data/communities.json | 0 source.json => data/source.json | 0 topics.json => data/topics.json | 0 src/functions/groups.rs | 2 +- src/functions/useful.rs | 2 +- src/utils/groups.rs | 2 +- src/utils/resources.rs | 2 +- 7 files changed, 4 insertions(+), 4 deletions(-) rename communities.json => data/communities.json (100%) rename source.json => data/source.json (100%) rename topics.json => data/topics.json (100%) diff --git a/communities.json b/data/communities.json similarity index 100% rename from communities.json rename to data/communities.json diff --git a/source.json b/data/source.json similarity index 100% rename from source.json rename to data/source.json diff --git a/topics.json b/data/topics.json similarity index 100% rename from topics.json rename to data/topics.json diff --git a/src/functions/groups.rs b/src/functions/groups.rs index 4179bcc..d901fd9 100644 --- a/src/functions/groups.rs +++ b/src/functions/groups.rs @@ -8,7 +8,7 @@ use teloxide::{ types::{InlineKeyboardMarkup, ParseMode}, }; -static TEXT: &str = "Telegramdagi Rust Hamjamiyatlari yoki Guruhlari:\nAgar o'zingizni guruhingizni qo'shmoqchi bo'lsangiz, bizni community.json ni yangilang!"; +static TEXT: &str = "Telegramdagi Rust Hamjamiyatlari yoki Guruhlari:\nAgar o'zingizni guruhingizni qo'shmoqchi bo'lsangiz, bizni community.json ni yangilang!"; pub async fn command(bot: &Bot, msg: &Message, groups: &Groups) -> ResponseResult<()> { bot.send_message(msg.chat.id, TEXT) diff --git a/src/functions/useful.rs b/src/functions/useful.rs index 04ce2d1..99ae364 100644 --- a/src/functions/useful.rs +++ b/src/functions/useful.rs @@ -10,7 +10,7 @@ use teloxide::{ static TEXT: &str = "Rustga oid foydali materiallar:\n\ Agar o'zingizdan material qo'shmoqchi bo'lsangiz, bizni \ -\ +\ source.json ni yangilang!"; pub async fn command(bot: &Bot, msg: &Message, resources: &Resources) -> ResponseResult<()> { diff --git a/src/utils/groups.rs b/src/utils/groups.rs index 7f71628..882b5cd 100644 --- a/src/utils/groups.rs +++ b/src/utils/groups.rs @@ -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 { diff --git a/src/utils/resources.rs b/src/utils/resources.rs index b240c6a..a06536a 100644 --- a/src/utils/resources.rs +++ b/src/utils/resources.rs @@ -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 {