IGLADI / Ethereal-Hyperspace-Battleships

8 stars 0 forks source link

Database #42

Closed HGThinh closed 10 months ago

HGThinh commented 10 months ago

Database, Create database and table with SQL, create python file with connection and insert data functions to update data in the database [^1]

Modifications^2 Additions[^3] Additional remarks[^4]**

[^1]: Name and description of the issue

LordTlasT commented 10 months ago

delete what isn't related to the pull request. like commands modified ...

LordTlasT commented 10 months ago

Please use mariadb instead and add it to the requirements.txt file

LordTlasT commented 10 months ago

remove your main function, we will not run this python code, but rather import it.

this results into removing your unneeded import sys instruction

LordTlasT commented 10 months ago

Your connection is method is everything but secure, please import it from config.json and then post the login information in discord config-json channel.

LordTlasT commented 10 months ago

Remove the ENGINE staments. These should only be added later if required by the specificiation.

LordTlasT commented 10 months ago

you did not delete your exit function. This is probably a bug in your code.

IGLADI commented 10 months ago

Earth = C4MPU5 K441, make cool names for other planets Announcement channel Id not needed per guild: can be calculated at runtime (category name=guild name=>announcements channel) "DROP DATABASE IF EXISTS ethbdb; CREATE DATABASE ethbdb; USE ethbdb;" dangerous if rerunned for some reason ship should be linked to modules and not the other way

LordTlasT commented 10 months ago

Earth = C4MPU5 K441, make cool names for other planets

his would be a more fitting for the documentation master @luluwaza

"DROP DATABASE IF EXISTS ethbdb; CREATE DATABASE ethbdb; USE ethbdb;" dangerous if rerunned for some reason

This file is meant to be run on your local machine for testing and should only be run once. It creates the database, a file that creates the database again on rerun is a bit stupid so I added this functionality to 'reset' the database when rerun.