Commit Graph

1010 Commits

Author SHA1 Message Date
NovaFox161
2096fb577e Fix a number of issues regarding authorization and such
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
2020-05-06 17:39:50 -05:00
NovaFox161
b97585407a Trying to track down some errors with announcement editing 2020-05-05 22:17:53 -05:00
NovaFox161
341041a972 Still finding some errors with this somehow 2020-05-05 21:51:28 -05:00
NovaFox161
c7d826f4b9 Hopefully this fixes the issue of not listing subscribers
It's not the best way to do this, but it should work well enough
2020-05-05 21:25:08 -05:00
NovaFox161
4187936b58 This should fix the not listing of subscribers 2020-05-05 20:33:53 -05:00
NovaFox161
48c34263a1 This should also fix some more errors with getting users/roles 2020-05-05 19:59:59 -05:00
NovaFox161
b2075210c4 Fix bad mapping attempting to get announcements by UUID and not string 2020-05-05 19:29:05 -05:00
NovaFox161
920756ed31 Maybe this will fix some issues with finding users 2020-05-05 19:02:29 -05:00
NovaFox161
07353a91b5 Should fix parsing error being emitted 2020-05-05 18:12:23 -05:00
NovaFox161
d9c87260ce This should fix the RSVP command not returning
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.
2020-05-05 18:02:00 -05:00
NovaFox161
c36db9aeff Get events command fully working without emitting no cal message 2020-05-05 17:53:19 -05:00
NovaFox161
32f2d037b8 Fix calendar link not converting guild ID to string 2020-05-05 17:42:49 -05:00
NovaFox161
3451714f30 Wasn't changing patron/dev params correctly 2020-05-05 17:38:18 -05:00
NovaFox161
82367c3a3e Add global constants for discord base URLs since discord changed them 2020-05-05 17:20:39 -05:00
NovaFox161
f8536194a2 Hopefully this fixes null error when trying to retrieve version info 2020-05-03 20:29:08 -05:00
NovaFox161
314bbce300 This should fix the null error when getting messages from lang files 2020-05-03 19:24:12 -05:00
NovaFox161
0e7a027c2f This should fix the reactor netty versioning issues 2020-05-03 18:27:43 -05:00
NovaFox161
cd9817b201 Convert to fully reactive, mostly
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!
2020-05-03 17:19:53 -05:00
NovaFox161
3e6dd0dd33 Fix null errors occurring due to EventData being null 2020-04-13 23:27:25 -05:00
NovaFox161
77950cb6e8 Fix permissions checking for correct permissions
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
2020-04-13 23:23:27 -05:00
NovaFox161
4861c56b58 Fix null error on event confirm 2020-04-13 21:20:35 -05:00
NovaFox161
65d4cad204 Reformat entire project to using spaces instead of tabs
Finally fucking fixing the formatting after all these years
2020-04-13 18:39:41 -05:00
NovaFox161
24b797f1b4 Fix not subscribing to event listeners in our current work around 2020-04-13 17:48:36 -05:00
NovaFox161
c41230f62c Make event listeners reactive among other small fixes
Set r2dbc-mysql logging to info instead of debug as it is no longer
needed.
2020-04-13 17:36:57 -05:00
NovaFox161
99a65c5388 Temporary work around for event listeners no working as expected 2020-04-13 02:05:22 -05:00
NovaFox161
1c9eb49e95 Migrate to D4j v3.1.0-SNAPSHOT
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.
2020-04-13 01:28:17 -05:00
NovaFox161
5d89cf60af Trying to get client to login correctly 2020-04-12 14:19:40 -05:00
NovaFox161
07f914ac97 Revert to d4j 3.0.13
Not sure if this is the culprit, but the only reason I can see login not
occurring correctly.
2020-04-12 13:53:07 -05:00
NovaFox161
64d7242ce2 Fix getting of announcement and calendar count from database
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.
2020-04-12 00:30:43 -05:00
NovaFox161
b8d42da230 ITS FINALLY FIXED! THE RANDOM ERROR IS NO MORE!
"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
2020-04-12 00:11:06 -05:00
NovaFox161
ff39bd155f Somehow this file didn't get committed 2020-04-11 16:05:10 -05:00
NovaFox161
891dc971e5 Fix database return inconsistency
When dealing with the API, this fixes the inconsistency in returning,
apparently caused by an UPDATE after a SELECT.
2020-04-11 16:00:02 -05:00
NovaFox161
11e5f40660 Fix update calendar endpoint not setting desc properly
Also fix database error
2020-04-10 21:38:26 -05:00
NovaFox161
9522404c91 Rewrite logger to be async
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
2020-04-10 20:50:18 -05:00
NovaFox161
37c7f2d075 Fix several errors that were occurring for various reasons
This fixes an IllegalStateException happening when closing connections,
as well as some null errors caused by some changing of the logging
system.
2020-04-09 22:17:41 -05:00
NovaFox161
d7be886fb0 Clean up database manager and ignore specific exception
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)
2020-04-09 20:09:08 -05:00
NovaFox161
02f9c6e7e4 Add db migrations to fix data types in several tables
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.
2020-04-09 13:17:36 -05:00
NovaFox161
e5dbe75960 Alter TIME_ISSUED col to be bigint instead of mediumtext
Don't know why it was medium text in the first place, but this is now
fixed and resolved
2020-04-09 00:15:37 -05:00
NovaFox161
f6148760f3 Fix errors relating to netty version conflicts 2020-04-08 20:04:54 -05:00
NovaFox161
6118224318 exclude netty from d4j stores redis because of possible version mismatch 2020-04-07 23:13:24 -05:00
NovaFox161
4b7025215e Flyway requires regular mysql driver which was accidentally removed 2020-04-07 22:32:44 -05:00
NovaFox161
5c0c1e514d Convert all database calls to being reactive
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.
2020-04-07 22:18:43 -05:00
NovaFox161
f504696229 Convert several other data classes to be immutable 2020-04-05 20:23:14 -05:00
NovaFox161
ec9d8adbbd Create WebPartialGuild for partial guild data object
Use a partial guild object instead of a full guild object when partial
is all we need so null values are not floating around.
2020-04-04 16:51:15 -05:00
NovaFox161
db05559c2a Add a few folders to .gitignore incase we forget to run mvn clean
This is so that generated files don't get included in the repo by
accident due to forgetting to clean the project after running local
tests
2020-04-04 00:12:46 -05:00
NovaFox161
60dd9c0a62 Convert several data classes to be immutable 2020-04-03 17:22:59 -05:00
NovaFox161
2040505ed6 Remove debug statements as endpoint has been sped up as best we can
Endpoint now takes about 3-4 seconds to respond all told, which is
better than the original 15 seconds on average.
2020-04-03 16:51:36 -05:00
NovaFox161
5bac8a4c51 Dannie - Parallelize Mono/Database Calls to Improve Response Times 2020-04-03 16:40:52 -05:00
NovaFox161
c369710e50 Debugging guild get endpoint taking too long to execute
Add some more debug statements to see where execution is still slowing
down. So far its at about 4-5 seconds, the goal is to get it near 1 sec.
max
2020-04-03 15:00:46 -05:00
NovaFox161
524db88f6c Debugging guild get endpoint taking too long to execute
Optimize WebGuild conversion so that it will hopefully take less than
the current ~4 seconds to execute
2020-04-02 23:28:12 -05:00