Improve errors and wording
This commit is contained in:
		@@ -65,7 +65,16 @@ pub async fn create_reminder(
 | 
			
		||||
    if let Err(e) = channel {
 | 
			
		||||
        warn!("`create_database_channel` returned an error code: {:?}", e);
 | 
			
		||||
 | 
			
		||||
        return Err(json!({"error": "Failed to configure channel for reminders."}));
 | 
			
		||||
        // Provide more specific error messages based on the error type
 | 
			
		||||
        let error_msg = match e {
 | 
			
		||||
            Error::MissingDiscordPermission(permission) => format!(
 | 
			
		||||
                "Please ensure the bot has the \"{}\" permission in the channel",
 | 
			
		||||
                permission
 | 
			
		||||
            ),
 | 
			
		||||
            _ => "Failed to configure channel for reminders.".to_string(),
 | 
			
		||||
        };
 | 
			
		||||
 | 
			
		||||
        return Err(json!({"error": error_msg}));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    let channel = channel.unwrap();
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user