I'm aiming to create a Discord bot using the Serenity crate in Rust, but I'm new to Rust and this is my first project. To streamline my learning process, should I follow my Rust book step-by-step and then dive into understanding the Serenity crate, or should I first gain some general familiarity with Rust concepts before exploring the crate? I'm just looking for some guidance on how to approach this project for learning.
1 Answer
Since you've got a specific project in mind, I suggest starting with a simple open-source Discord bot and modifying it to fit your needs. Look for something like a "hello world" bot that responds with "hello" after each message. First, learn how to build a Rust program (which your book covers), and then find out how to host a bot, which isn't strictly Rust-related. Once you can get a bot running, you can start experimenting and troubleshooting. That's a solid way to learn!
Great idea! Serenity has some example bots on their page that can help you. Some parts may be confusing, especially async features, but using those examples as templates and adding complexity as you learn more sounds like a good plan.