Improve errors and wording
This commit is contained in:
@@ -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());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user