Voxel-Fox-Ltd / VoxelBotUtils

An extension of the Discord.py library to improve the bot development process.
https://voxelbotutils.readthedocs.io/en/latest/
GNU General Public License v2.0
34 stars 12 forks source link

Allow "database" in config for mysql connections #161

Open 4Kaylum opened 2 years ago

4Kaylum commented 2 years ago

Aiomysql requires "db" instead of "database". VBU should allow both.

Crafter-san commented 2 years ago

Aiomysql requires "db" instead of "database". VBU should allow both.

I will try my best to see what I can do for that

Crafter-san commented 2 years ago

@4Kaylum when you're awake, please elaborate on which part it requires "database". Are you talking about item names in objects sent to the API? or are you talking about variables?

sn8to commented 2 years ago

The current VBU config file takes in database connection options with the "database" key. The "db" key should be considered an alias/alternative to this key.

If both are supplied, which one should take over the other?

Silverdimond commented 2 years ago

The current VBU config file takes in database connection options with the "database" key. The "db" key should be considered an alias/alternative to this key.

If both are supplied, which one should take over the other?

Ideally, the last one that is defined in a file so they would overwrite each other but maybe "database" if checking for the last one in a file is not a possibility as "database" is just longer and more noticeable in a large configuration file.
I would love to know what your opinions are and the justifications behind those opinions

4Kaylum commented 2 years ago

honestly the config should just stay as only allowing "database" and just parse it differently for msql connections