From 3605d71b73de1af98be63be565b258168c986192 Mon Sep 17 00:00:00 2001 From: jude Date: Mon, 31 Jul 2023 17:59:38 +0100 Subject: [PATCH] Suppress errors. Restyle --- src/main.rs | 14 ++++++++++++++ systemd/reminder-rs.service | 2 +- web/static/css/style.css | 4 ---- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/src/main.rs b/src/main.rs index 15e8afd..aaed99a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -176,6 +176,20 @@ async fn _main(tx: Sender<()>) -> Result<(), Box> { allowed_mentions: None, command_check: Some(|ctx| Box::pin(all_checks(ctx))), event_handler: |ctx, event, _framework, data| Box::pin(listener(ctx, event, data)), + on_error: |error| { + Box::pin(async move { + match error { + poise::FrameworkError::CommandCheckFailed { .. } => { + // suppress error + } + error => { + if let Err(e) = poise::builtins::on_error(error).await { + log::error!("Error while handling error: {}", e); + } + } + } + }) + }, ..Default::default() }; diff --git a/systemd/reminder-rs.service b/systemd/reminder-rs.service index 739ba74..e44bdc3 100644 --- a/systemd/reminder-rs.service +++ b/systemd/reminder-rs.service @@ -8,7 +8,7 @@ ExecStart=/usr/bin/reminder-rs WorkingDirectory=/etc/reminder-rs Restart=always RestartSec=4 -Environment="RUST_LOG=warn,reminder_rs=warn,postman=warn" +Environment="reminder_rs=warn,postman=warn" [Install] WantedBy=multi-user.target diff --git a/web/static/css/style.css b/web/static/css/style.css index 6f01490..8987429 100644 --- a/web/static/css/style.css +++ b/web/static/css/style.css @@ -373,10 +373,6 @@ input.default-width { } .message-input:placeholder-shown { - border-top: none; - border-left: none; - border-right: none; - border-bottom-style: dashed; background-color: #40444b; color: #fff; }