use amsel::*; #[tokio::main] async fn main() -> Result<()> { let session = BskySession::new_from_env().await?; session.run(PingBot { counter: 0 }).await } struct PingBot { counter: u64, } impl SimpleFileCursorStore for PingBot {} impl AmselBot for PingBot { async fn on_post(&mut self, post: BskyPost) -> Result<()> { if post.text.contains("!ping") { self.counter += 1; let msg = format!("Pong! #{}", self.counter); post.reply_text(msg).await?; } Ok(()) } }