(config: &PathBuf, once: bool, force: bool)
| 146 | } |
| 147 | |
| 148 | async fn renew(config: &PathBuf, once: bool, force: bool) -> Result<()> { |
| 149 | let bot_config = load_config(config).context("Failed to load configuration")?; |
| 150 | let bot = bot_config |
| 151 | .build_bot() |
| 152 | .await |
| 153 | .context("Failed to build bot")?; |
| 154 | if once { |
| 155 | bot.renew(force).await?; |
| 156 | } else { |
| 157 | bot.run().await; |
| 158 | } |
| 159 | Ok(()) |
| 160 | } |
| 161 | |
| 162 | #[tokio::main] |
| 163 | async fn main() -> Result<()> { |
no test coverage detected