Improve errors and wording

This commit is contained in:
jude
2025-06-18 22:08:32 +01:00
parent 265e48f84b
commit 761d545496
6 changed files with 118 additions and 23 deletions

View File

@@ -305,7 +305,15 @@ pub async fn edit_reminder(
Err(e) => {
warn!("`create_database_channel` returned an error code: {:?}", e);
error.push("Failed to configure channel for reminders. Please check the bot permissions".to_string());
// Provide more specific error messages based on the error type
match e {
crate::web::Error::MissingDiscordPermission(permission) => {
error.push(format!("Please ensure the bot has the \"{}\" permission in the channel", permission));
}
_ => {
error.push("Failed to configure channel for reminders. Please check the bot permissions".to_string());
}
}
}
}
}