Hey everyone! I’m trying to make a Discord bot that can help users find items in a game. Does anyone have experience with this kind of project? I’m not sure where to start.
I was thinking maybe the bot could respond to commands like ‘!find sword’ and then give info on where to find that item. But I’m not sure how to set up the database of items and locations.
Also, should I use Python or JavaScript for this? I’ve heard both are good for Discord bots. Any tips or resources would be super helpful. Thanks in advance!
yo, i made a bot like that for minecraft! used javascript with discord.js. worked great. for the database, json files are simple n quick. just create an object with items as keys and locations as values. add some aliases like ‘!search’ or ‘!spot’. good luck with ur project!
I’ve actually built a similar Discord bot for a popular MMORPG. From my experience, Python with the discord.py library worked really well. For the database, I’d recommend using SQLite - it’s lightweight and easy to set up for this kind of project.
To structure your data, create tables for items and locations, then link them with a junction table. This allows you to easily query where multiple items can be found or what items are in a specific location.
For commands, you’re on the right track. I’d suggest adding variations like ‘!locate’ or ‘!where’ to make it more intuitive for users. Also, consider implementing fuzzy matching for item names to handle typos.
One challenge I faced was keeping the data updated with game patches. You might want to plan for a way to easily update your database, perhaps by scraping official wikis or patch notes.
I developed a similar bot for a tabletop RPG community. Used Python with discord.py and a PostgreSQL database for scalability. Structured data with items, locations, and a linking table for complex relationships. Implemented command aliases and fuzzy search for user-friendliness. Crucial advice: plan for data maintenance from the start. Consider crowdsourcing updates from trusted users or automating scrapes from reliable sources. Also, implement logging to track popular searches - helps prioritize data updates and identify missing information. Remember to handle edge cases like items with multiple locations or seasonal availability.