feat: smart day string, terse refactor and use types properly, work on unimplemented commands lightly, util modules,

This commit is contained in:
2025-08-27 13:46:41 -05:00
parent cb8a595326
commit c7117f14a3
18 changed files with 228 additions and 111 deletions

View File

@@ -1,6 +1,7 @@
//! ICS command implementation for generating calendar files.
use crate::bot::{Context, Error};
use crate::bot::{Context, Error, utils};
use tracing::info;
/// Generate an ICS file for a course
#[poise::command(slash_command, prefix_command)]
@@ -10,16 +11,15 @@ pub async fn ics(
) -> Result<(), Error> {
ctx.defer().await?;
// TODO: Get BannerApi from context or global state
// TODO: Get current term dynamically
let term = 202510; // Hardcoded for now
let course = utils::get_course_by_crn(&ctx, crn).await?;
// TODO: Implement actual ICS file generation
ctx.say(format!(
"ICS command not yet implemented - BannerApi integration needed\nCRN: {}, Term: {}",
crn, term
"ICS generation for '{}' is not yet implemented.",
course.display_title()
))
.await?;
info!("ics command completed for CRN: {}", crn);
Ok(())
}