Building BricoBot: My Journey with a BitCraft Discord Bot in Go

Building BricoBot: My Journey with a BitCraft Discord Bot in Go

What is BricoBot?

BricoBot is a custom Discord bot built for BitCraft players, the epic survival MMO where teamwork makes the dream work! BricoBot is your go-to buddy for coordinating professions, managing material needs, and tracking deliveries with simple, team-friendly commands. It’s like having a trusty sidekick for your BitCraft adventures! ⚒️

Why GO with Gin?

I recently dived into Go after some awesome courses, and wow, what a language! 😍 Transitioning from PHP to Go was a bit of a rollercoaster —Go’s a different beast! After some research, I stumbled upon Gin, a sleek and lightweight web framework for Go that’s just chef’s kiss for building fast apps. It’s perfect for my BricoBot project!

What I Learned Along the Way

  1. Mastering Go Basics
    Go’s simplicity and strong typing were a breath of fresh air. 💨 I got the hang of structuring code with packages and using goroutines for concurrent tasks, like juggling multiple Discord events at once. Multitasking, Go style! ⚡
  2. Go lang ≠ PHP
    Big lesson: trying to write Go like PHP was a total facepalm moment. 😅 PHP runs everything per request, but Go? It’s always online, and Gin handles requests like a pro. One wrong move in a request can mess up your app’s state, so you gotta stay sharp!
  3. Go structure and functions
    I initially tried mimicking PHP classes in Go, but surprise—Go doesn’t do classes! 😲 Instead, I learned to use folder structures and receivers to replicate that class-like logic. It’s like building a LEGO castle without the instruction manual, but I made it work! 🏰
  4. Discord API
    The Discord API docs? Absolute gold. 🌟 Crystal-clear and easy to navigate, they made it a breeze to figure out how to handle commands, send DMs, and create those slick slash commands. No headaches here! 😎

The BricoBot Journey 🚀

That’s the story of how I built BricoBot—a Discord bot tailored for BitCraft players to track professions, skills, and tasks outside the game. It lets you create objectives and post them in a Discord channel, keeping your team in sync and ready to conquer! 💪

Want to know more? Check out all the juicy details at: bricobot.site