#🔒 Best Database for Discord Bots?

32 messages · Page 1 of 1 (latest)

surreal parcel
#

I understand that there are a lot of databases out there to choose from, a popular one being SQLite that I was considering, but are there any better alternatives?

The bot will only be in my server so capacity isn’t much of a worry. I just need it to work well with python and be easy to work on.

limber topazBOT
#

@surreal parcel

Python help channel opened

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.

fading terrace
#

"best" is not always "easiest"

peak oracle
#

sqlite is a great choice

mystic kiln
#

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

surreal parcel
#

The only thing to think about with discord bots is making it asynchronous

peak oracle
#

if you need more features like replication or multi-threading, postgres is a good choice

#

!pip aiosqlite

limber topazBOT
#

asyncio bridge to the standard sqlite3 module

Released on <t:1738567816:D>.

surreal parcel
#

Oh awesome, asynchronous sqlite

peak oracle
#

!pip psycopg supports async as well

limber topazBOT
#

PostgreSQL database adapter for Python

Released on <t:1741812192:D>.

fading terrace
#

both are great options, try reading a bit about them and choose which one you feel is better

surreal parcel
#

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

peak oracle
#

!pip sqlalchemy if you want to support both

limber topazBOT
peak oracle
#

also provides an orm

surreal parcel
#

Orm?

fading terrace
surreal parcel
# fading terrace what data are you going to store?

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.

fading terrace
#

sounds like a fun project!

surreal parcel
#

Like an economy bot with extra steps

#

Lol

mystic kiln
surreal parcel
#

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 )

fading terrace
#

either way, id probably recommend using sqlalchemy since working in an ORM is much more enjoyable

limber topazBOT
#
Python help channel closed for inactivity

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.