#🔒 Best Database for Discord Bots?
32 messages · Page 1 of 1 (latest)
@surreal parcel
Remember to:
- Ask your Python question, not if you can ask or if there's an expert who can help.
- Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
- Explain what you expect to happen and what actually happens.
:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.
"best" is not always "easiest"
sqlite is a great choice
i suggest postgres simply cause its a really nice database but idk if discord bots in specific would have a preferred choice (cant think of a reason why they would) but ye sqlite also great
The only thing to think about with discord bots is making it asynchronous
if you need more features like replication or multi-threading, postgres is a good choice
!pip aiosqlite
Oh awesome, asynchronous sqlite
!pip psycopg supports async as well
both are great options, try reading a bit about them and choose which one you feel is better
I don’t think I need any advanced features that postgre has - it’s just a bot for my server and for the tens of people in my server
!pip sqlalchemy if you want to support both
also provides an orm
Orm?
what data are you going to store?
object relational mapping
It’s a long story but users can make a character to present themselves as. So I will store the character information they have for a potential lookup command. Users cab contribute virtual currency to the server so I will also be logging every transaction/submission. And also keeping track of how much cash each user submits.
sounds like a fun project!
ya making a roleplay bot for a dnd server or something ? 
Roblox. (Silly I know)
Intending to make a full fledged Mafia / Criminal Organisation for a roleplay game and figured working on a custom bot with a system will help me stand out
I’m honestly still contemplating if my bot should be just a bot or if I should give it a personality and have the ‘bot’ also be a character in the roleplay that you just never se
See )
either way, id probably recommend using sqlalchemy since working in an ORM is much more enjoyable
This help channel has been closed. Feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.