Skip to content

Commit 1834277

Browse files
hrideshmgivinjabraham
authored andcommitted
fix: warnings and dead code
1 parent 7b71891 commit 1834277

File tree

2 files changed

+3
-30
lines changed

2 files changed

+3
-30
lines changed

src/ids.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,5 @@ pub const RESEARCH_ROLE_ID: u64 = 1298553855474270219;
3333
pub const DEVOPS_ROLE_ID: u64 = 1298553883169132554;
3434
pub const WEB_ROLE_ID: u64 = 1298553910167994428;
3535

36-
// Channel IDs for status updates
37-
pub const SYSTEMS_CHANNEL_ID: u64 = 1378426650152271902;
38-
pub const MOBILE_CHANNEL_ID: u64 = 1378685538835365960;
39-
pub const WEB_CHANNEL_ID: u64 = 1378685360133115944;
40-
pub const AI_CHANNEL_ID: u64 = 1343489220068507649;
4136
pub const STATUS_UPDATE_CHANNEL_ID: u64 = 764575524127244318;
4237
pub const THE_LAB_CHANNEL_ID: u64 = 1208438766893670451;

src/tasks/status_update.rs

Lines changed: 3 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,16 @@ GNU General Public License for more details.
1515
You should have received a copy of the GNU General Public License
1616
along with this program. If not, see <https://www.gnu.org/licenses/>.
1717
*/
18-
use std::collections::{HashMap, HashSet};
19-
use std::time::Duration;
18+
use std::collections::HashMap;
2019

21-
use chrono::DateTime;
22-
use serenity::all::{
23-
CacheHttp, ChannelId, Context, CreateEmbed, CreateMessage, GetMessages, Message,
24-
};
20+
use serenity::all::{CacheHttp, ChannelId, Context, CreateEmbed, CreateMessage};
2521
use serenity::async_trait;
2622
use tracing::instrument;
2723

2824
use super::Task;
2925
use crate::graphql::models::Member;
3026
use crate::graphql::GraphQLClient;
31-
use crate::ids::{
32-
AI_CHANNEL_ID, MOBILE_CHANNEL_ID, STATUS_UPDATE_CHANNEL_ID, SYSTEMS_CHANNEL_ID, WEB_CHANNEL_ID,
33-
};
27+
use crate::ids::STATUS_UPDATE_CHANNEL_ID;
3428
use crate::utils::time::time_until;
3529

3630
/// Checks for status updates daily at 5 AM.
@@ -54,12 +48,6 @@ impl Task for StatusUpdateReport {
5448

5549
type GroupedMember = HashMap<Option<String>, Vec<Member>>;
5650

57-
struct ReportConfig {
58-
time_valid_from: DateTime<chrono_tz::Tz>,
59-
keywords: Vec<&'static str>,
60-
special_authors: Vec<&'static str>,
61-
}
62-
6351
#[instrument(level = "debug", skip(ctx))]
6452
pub async fn status_update_check(ctx: Context, client: GraphQLClient) -> anyhow::Result<()> {
6553
let now = chrono::Utc::now().with_timezone(&chrono_tz::Asia::Kolkata);
@@ -80,16 +68,6 @@ pub async fn status_update_check(ctx: Context, client: GraphQLClient) -> anyhow:
8068
Ok(())
8169
}
8270

83-
// TODO: Replace hardcoded set with configurable list
84-
fn get_channel_ids() -> Vec<ChannelId> {
85-
vec![
86-
ChannelId::new(SYSTEMS_CHANNEL_ID),
87-
ChannelId::new(MOBILE_CHANNEL_ID),
88-
ChannelId::new(WEB_CHANNEL_ID),
89-
ChannelId::new(AI_CHANNEL_ID),
90-
]
91-
}
92-
9371
fn categorize_members(members: &Vec<Member>) -> GroupedMember {
9472
let mut naughty_list: HashMap<Option<String>, Vec<Member>> = HashMap::new();
9573

0 commit comments

Comments
 (0)