diff --git a/dicebot/src/config.rs b/dicebot/src/config.rs index 55abbce..fc842db 100644 --- a/dicebot/src/config.rs +++ b/dicebot/src/config.rs @@ -49,7 +49,7 @@ fn db_path_from_env() -> String { } /// The "bot" section of the config file, for bot settings. -#[derive(Serialize, Deserialize, Clone, Debug)] +#[derive(Serialize, Deserialize, Clone, Debug, Default)] struct BotConfig { /// How far back from current time should we process a message? oldest_message_age: Option, @@ -189,6 +189,7 @@ mod tests { }), bot: Some(BotConfig { oldest_message_age: None, + ..Default::default() }), };