Skip to content

Commit 950b562

Browse files
committed
feat(bot): add presence_status field to BotState
1 parent 9da696b commit 950b562

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

rustmail/src/bot.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ pub async fn init_bot_state() -> Arc<Mutex<BotState>> {
3838
bot_http: None,
3939
bot_context: Arc::new(tokio::sync::RwLock::new(None)),
4040
maintenance_mode: Arc::new(AtomicBool::new(false)),
41+
presence_status: Arc::new(tokio::sync::RwLock::new("online".to_string())),
4142
};
4243

4344
Arc::new(Mutex::new(bot_state))

rustmail/src/types/bot.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,5 @@ pub struct BotState {
2828
pub bot_http: Option<Arc<Http>>,
2929
pub bot_context: Arc<RwLock<Option<Context>>>,
3030
pub maintenance_mode: Arc<AtomicBool>,
31+
pub presence_status: Arc<RwLock<String>>,
3132
}

0 commit comments

Comments
 (0)