diff --git a/src/commands/export.rs b/src/commands/export.rs index bb23345..67c0b72 100644 --- a/src/commands/export.rs +++ b/src/commands/export.rs @@ -51,7 +51,7 @@ async fn get_master_pass( accounts.sort_unstable_by(|this, other| this.name.cmp(&other.name)); - let json = serde_json::to_vec_pretty(&User { accounts })?; + let json = spawn_blocking(move || serde_json::to_vec_pretty(&User { accounts })).await??; let file = InputFile::memory(json).file_name("accounts.json"); bot.send_document(msg.chat.id, file)