feat: fixed deploy script for setting up service for restarting

This commit is contained in:
Jet Pham 2025-06-06 19:34:29 -07:00
parent e761320bc7
commit baef052a4a
No known key found for this signature in database
4 changed files with 44 additions and 23 deletions

View file

@ -3,7 +3,7 @@ use std::time::Instant;
use anyhow::Result;
use serenity::prelude::*;
use serenity::model::channel::ChannelId;
use serenity::model::id::ChannelId;
use tracing::{info, error};
pub struct DiscordClient {
@ -32,7 +32,7 @@ impl DiscordClient {
Ok(Self {
client,
channel_id: ChannelId(channel_id),
channel_id: ChannelId::new(channel_id),
})
}

View file

@ -50,7 +50,6 @@ async fn main() -> Result<()> {
let callback = move |event: gpio::CircuitEvent| {
info!("Circuit state changed: {:?}", event);
let discord_client = discord_client_clone.clone();
tokio::spawn(async move {
if let Err(e) = discord_client.send_circuit_event(&event).await {