pxlsspace / PxlsBot

Modular Discord bot
ISC License
4 stars 2 forks source link

Big changes to bring the bot back to life #10

Closed netux closed 4 years ago

netux commented 4 years ago

This PR brings a lot of updates to the codebase as a base for planned future changes.

Updates dependencies to their latest versions.

Most importantly, Typescript is now on v4, and Discord.js is now on v12. Both have some breaking changes.

Add linting

Replaces the semistandard linting with a more general eslint configuration. This also includes Typescript specific rules.

Move to PostgreSQL

The game moved almost a year ago, and keeping a MariaDB server running just for this bot seems like a waste of resources.

Other changes

Breaking changes

Because of the move to PostgreSQL, you'll need to setup the bot with that database. mysqldump and pg_dump is your friend here, although them interacting correctly is not guaranteed. Check the changes on this PR and try to implement them into the dumped MariaDB

This PR also modifies the config table by dropping the id column and making guild_id the primary key, I thought the id column was redundant because guild_id was also marked as an unique key.