修改了部分bot代码

This commit is contained in:
:NoBody: committed 2026-03-26 20:33:08 +08:00
1 parent 821168a770
commit bbbdd9eac5
10 files changed
+164 -19

No files matched your search

+7 -2
View File
@@ -1,8 +1,9 @@
use std::{sync::OnceLock, time::Duration};
use tokio::task::JoinHandle;
use anyhow::Result;
use async_trait::async_trait;
#[async_trait]
pub trait Sender {
async fn send(&self, message: OutboundMessage) -> Result<String>;
@@ -36,7 +37,7 @@ pub struct InputBatch {
}
#[async_trait]
pub trait AttendanceBot {
pub trait AttendanceHandler {
async fn handle_commands(&self) -> Result<JoinHandle<()>>;
}
@@ -45,3 +46,7 @@ pub enum MessageEnum {
TelegramMessage(InboundMessage),
StopMessage,
}
#[async_trait]
pub trait Bot {
async fn start(&self) -> Result<()>;
}