For one, this should fix the error when handling Google external auth,
as it was blocking and I hadn't rewrote it, so that should be working
now.
Should also fix not responding to commands when there is no
GuildSettings saved for the guild
The command isn't meant to handle empty. It always assumes RSVP data
exists. Due to this, the database call will always return RSVP Data,
even if it is a new object.
Okay, so its almost fully reactive. The API is still blocking as of
current. Everything else is reactive now:
- Command system
- All utility methods
- Event listeners
- Announcement Thread
- Google calendar auth
Added simple reactive wrappers for google calendar blocking calls
I have no idea if any of this works, but it *should* work. Time to test!
This makes sure that users with admin permissions can run commands like
`!event create` without needing the bot's control role as admins have
full access to everything on the server.
This commit also wraps the command registration in a fromRunnable call
so that it doesn't block the client login
Massive changes to the bot and d4j required migrating to the latest
snapshot. So far everything seems to work well, but will be tested later
on this week. Hopefully this is one step closer to being able to deploy
this to production in order to make the bot more stable and responsive.
The data type of the number returned by `COUNT(*)` is apparently a
bigint and r2dbc does not support mapping bigint to integer. So it is
mapped as a long and then converted to an integer.
"So after reviewing her code basically she is an idiot (but I enabled
her) basically she was using the Result after consuming it because she
wanted to do it in a weird ass way, or partly because she doesn't quite
understand Reactor. I thought it was -fine-, but since I am incapable of
reading turned out it was the problem so it's fixed now" - Dannie
Completely rewrote our in-house logger so that its completely async.
Also designed the new logger so that we could pull it out of this
project and incorporated into our general utils library for all of our
other projects
The exception ignored is only thrown when no data is returned by the
query. This does not need to be handled, as that is intended function
and therefore can be ignored.
This commit also updated D4J to latest (3.0.14)
Apparently several tables were setup with incorrect datatypes resulting
in mapping issues. This is now resolved with the migration scripts
converting the datatypes to the correct types.
This commit introduces the r2dbc api for all database handling to make
it fully reactive so future updates to make the bot fully reactive.
While most calls to the database are still blocking, this does use a
reactive driver for it so further work down the line will be able to use
the database reactively without much additional work.
These changes have not been tested, and will need to be tested
thoroughly as database use is the backbone for the bot's persistence
data scheme.