Sync once on bot startup

This commit is contained in:
Xiretza 2023-07-18 20:19:25 +00:00
parent 4d06a1df84
commit 8f0c762637

View file

@ -297,6 +297,8 @@ impl Bot {
/// Runs the bot. This function does not return except in case of error.
#[instrument(skip(self))]
pub async fn run(mut self) -> Result<Never> {
self.client.sync_once(SyncSettings::default()).await?;
self.join_announce_rooms()
.await
.wrap_err("failed to join announcement rooms")?;