Commit Graph

102 Commits

Author SHA1 Message Date
NovaFox161
4114c33409 use new Discord4j Color class 2020-05-14 15:25:18 -05:00
NovaFox161
3f7a7f54d0 Fix incorrect date/time display when creating events 2020-05-10 23:32:31 -05:00
NovaFox161
2c42260e97 Remove debug statement I forgot to delete earlier 2020-05-08 23:08:15 -05:00
NovaFox161
9d3fbfc700 Finally!!! the add cal command has been fixed and is now working!! 2020-05-08 21:24:53 -05:00
NovaFox161
67963d5aa4 More debugging!!! Empty?????? Losing my damn mind right now 2020-05-08 18:06:51 -05:00
NovaFox161
54ec3ae196 More debugging!!! Empty?????? 2020-05-08 17:08:02 -05:00
NovaFox161
8214182471 More debugging!!! 2020-05-08 14:37:58 -05:00
NovaFox161
47995a9a0f Still trying to get google auth polling working correctly again 2020-05-06 22:08:47 -05:00
NovaFox161
ce70dfe5f2 Fix missing binding in guild settings insert 2020-05-06 17:51:34 -05:00
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
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
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
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
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
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
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
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
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
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
6118224318 exclude netty from d4j stores redis because of possible version mismatch 2020-04-07 23:13:24 -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
60dd9c0a62 Convert several data classes to be immutable 2020-04-03 17:22:59 -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
NovaFox161
20eef0e115 Debugging guild get endpoint taking too long to execute
Rewrote a whole ton of the permissions checking so that it should run
faster. Hopefully this helps speed up the guild get endpoint
significantly
2020-04-01 20:55:22 -05:00
NovaFox161
ad0168de98 Debugging guild get endpoint taking too long to execute
This should optimize numerous things including discal role permission
check
2020-04-01 02:20:50 -05:00
NovaFox161
23fad39ae6 Debugging guild get endpoint taking too long to execute
Attempt to make channel aggregating and bot nickname retrieving faster
2020-04-01 00:59:35 -05:00
NovaFox161
e3093f8c8d Add exact timestamp to logging webhooks for clearer info
Added the timestamp to the webhooks used for logging so that staff can
know easily when the message was pushed to the webhook, rather than just
when discord received it in the event of several messages within a few
seconds, as discord only shows down to the minute
2020-04-01 00:38:41 -05:00
NovaFox161
f510b5fb40 Debugging guild get endpoint taking too long to execute cont
still trying to make getting roles faster as this seems to be one of the
slowdowns.
2020-04-01 00:27:46 -05:00
NovaFox161
3fd18850af Debugging guild get endpoint taking too long to execute
Attempting to speed up part of this by rewriting how roles are converted
2020-03-31 23:27:44 -05:00
NovaFox161
036596f552 Debugging guild get endpoint taking too long to execute
We have narrowed down where the slowdown starts and ends, however there
is still a lot of things happening between there, so therefore we are
checking what parts of those sections of the code are causing issues.
2020-03-31 22:55:35 -05:00
NovaFox161
a5bd7cb444 Corrected wrongly configured repo deployment
Messed out how to deploy to repos in the poms as I forgot how to do it,
this issue is now fixed and it will correctly go through the deploy goal
while only actually deploying core to the repos.
2020-03-30 01:57:41 -05:00
NovaFox161
7729329a0b retool API to handle snowflake IDs as strings instead of longs
This is because they become out of range of JS's `number` type and cause
problems. So, by handling them as strings, and only strings withing the
API, this solves the issue and we should not run into precision issues
anymore.
2020-03-30 01:50:18 -05:00