unixporn / trup

Discord bot for the Unixporn community
Mozilla Public License 2.0
47 stars 9 forks source link

Implemented optional database #18

Open aosync opened 4 years ago

aosync commented 4 years ago

This idea is suggested in #8

Basically, I did it with a function that wraps the command handlers like moderatorOnly but called needsDatabase and it catches gracefully whether the database has been correctly initialized in db init, and prevents to command to be executed if it isn't the case.