Commit graph

156 commits

Author SHA1 Message Date
Noi
8fb7ee91a3
Merge pull request #20 from NoiTheCat/dev/database-revamp
Implement Entity Framework for all database usage
2022-03-23 11:03:01 -07:00
Noi
f4daa63bc5 Various fixes
- Fixed roles still not applying in certain occasions
- Suppressed several error messages during role updates
2022-03-22 12:33:33 -07:00
Noi
014b5a601d Increase log threshold for AutoUserDownload 2022-03-22 12:32:42 -07:00
Noi
3d4add3581 Update service exception handling
I didn't find the bug...
2022-03-22 00:08:40 -07:00
Noi
021def4f88 Fix roles not updating
Accidentally rewrote a handful of things while I was at it. The changes are staying.

After a long search, I found that this issue only shows itself if the bot is in several servers, encountering a valid configuration while it has yet to look at more servers (that is, a situation my debug bot is not in). The loop had been quitting halfway through for reasons seemingly beyond any logic or comprehension.

I already had a hunch that the query I wrote earlier was needlessly complex, as one might expect considering it was written during a state of delirium. It was easy to simplify it. I hoped that would be it, but no change occurred. On the contrary, some checks I slipped in there in the meantime were *passing*.

Further and further investigation finally revealed that the exception handler for background services doesn't actually do what it's expected to do. It's been silently dropping the exceptions that EF had been throwing this whole time, telling me quite plainly what the problem was and why it was quitting at a seemingly random spot.

The fix: Turns out the query evaluates during the foreach loop, which conflicts with wanting to do additional queries within it. Throwing a ToList() somewhere in it seems to have solved it.

These last few hours were quite the adventure...
My head hurts. Now I'm off to take a look at the exception handler.
2022-03-21 23:52:36 -07:00
Noi
2a1478fb0b Add log message 2022-03-21 23:33:24 -07:00
Noi
c280904cb8 Update services to use EF queries 2022-03-21 12:12:18 -07:00
Noi
a88797cb0a Debug query logging 2022-03-20 22:33:16 -07:00
Noi
4e0f23c033 Suppress obsolete warnings in deprecated code 2022-03-20 18:12:26 -07:00
Noi
97450482d9 Switch announce message setting to EF 2022-03-20 14:10:43 -07:00
Noi
39b8436741 Merge remote-tracking branch 'origin/main' into dev/database-revamp 2022-03-20 14:01:55 -07:00
Noi
2fc8fc8272
Merge pull request #19 from NoiTheCat/dev/modal
Send a modal to configure announcement messages
2022-03-20 13:52:37 -07:00
Noi
65fbdacf58 Have precondition queries be more explicit 2022-03-20 12:40:33 -07:00
Noi
b1b7c60211 Update commands to use EF queries 2022-03-20 01:07:17 -07:00
Noi
67decd6fb4 Update preconditions to use EF queries 2022-03-19 21:09:42 -07:00
Noi
0a81f208ea Add new extension methods for retrieving data 2022-03-19 18:10:10 -07:00
Noi
f52d8c81c8 Remove incorrect use of migrations 2022-03-19 18:07:30 -07:00
Noi
b9abaa2055 Suppress null warning 2022-03-19 17:04:16 -07:00
Noi
948c6955ec Edit obsolete tags, remove soon-to-be-unneeded extension methods 2022-03-19 14:53:53 -07:00
Noi
135a554bc5 Add migrations 2022-03-19 14:51:41 -07:00
Noi
faccd9b3aa Preliminary EntityFramework support 2022-03-19 00:00:15 -07:00
Noi
c8d6a87966 Use a modal to configure announcement messages
In addition, wrote a new static class just for receiving ModalSubmitted events in case any more modals may be handled in the future
2022-03-13 21:24:17 -07:00
Noi
d700cd8ce9 Implement block check within a precondition
With more preconditions in use, command logging has been modified to also be better able to respond to users in the event of an error. As a result, the bot is now able to respond to users and notify them properly if they fail any preconditions.
2022-03-11 22:11:18 -08:00
Noi
85b23e255c Merge branch 'slashcommands' 2022-03-11 10:33:26 -08:00
Noi
27c7cbd234 Merge branch 'main' into slashcommands 2022-03-11 10:33:04 -08:00
Noi
adc6006175 Add announce message check; update output
Oops, I thought I pushed this a long time ago... pushing now to avoid complications
2022-03-10 21:10:13 -08:00
Noi
10a88e37d0 Improve application command logging 2022-03-10 20:50:13 -08:00
Noi
228974c04f Fix incorrect description in export command 2022-03-10 19:31:47 -08:00
Noi
6c498045b3 Update precondition logic; make methods obsolete
The current way of loading database information makes things confusing and difficult to follow, particularly with retrieving guild data and its second parameter.
A much better alternative should be considered, and accessed by means of extension methods.
2022-03-10 19:30:28 -08:00
Noi
59820bced1 Add blocking commands 2022-03-10 17:11:43 -08:00
Noi
e73c05b819 Implement help command 2022-03-10 15:38:42 -08:00
Noi
ccb56ed243 Reorganize help strings 2022-03-10 15:37:34 -08:00
Noi
a58cedad88 Implement config commands 2022-03-10 14:09:15 -08:00
Noi
1728285683 Add overriding commands 2022-03-09 20:36:32 -08:00
Noi
07343735a0 Add and implement preconditions 2022-02-24 20:53:08 -08:00
Noi
7abe03b70d Move Data extensions to a more suitable area 2022-02-24 20:26:30 -08:00
Noi
a01b1113f9 Add birthday querying commands 2022-02-24 18:02:20 -08:00
Noi
4fc2d901f4
Merge pull request #17 from NoiTheCat/NoiTheCat-patch-1
Fix incorrect message when no recent birthdays
2022-02-23 23:10:31 -08:00
Noi
75d3bf0216
Fix incorrect message when no recent birthdays
Fixes #16
2022-02-23 23:07:51 -08:00
Noi
edec3134be Add birthday setting commands 2022-02-23 20:55:04 -08:00
Noi
b1af7922af Begin switch to Interaction Framework 2022-02-23 15:18:48 -08:00
Noi
74f876c4af Implemented more commands 2022-02-21 11:57:17 -08:00
Noi
1bf87f8827 Update packages, set new version number in advance 2022-02-14 21:30:22 -08:00
Noi
2c9920d87f Fix registration not working in release 2022-02-08 14:55:27 -08:00
Noi
5c6e0777f5 Move some strings into base class 2022-02-08 14:54:32 -08:00
Noi
80348f91ea Didn't I remove this? 2022-02-07 21:21:10 -08:00
Noi
42399e423c Add certain command overrides, matching existing options available via text commands 2022-02-03 21:49:19 -08:00
Noi
d27663a20a Add currently completed commands 2022-02-01 21:03:16 -08:00
Noi
b0c5ea4e3b Update command reporting format 2022-02-01 20:01:33 -08:00
Noi
f8b3f429bb Begin implementing slash commands
Set up a structure not unlike what exists for text commands in order to neatly separate subsets of commands/features into their own files.

Changed references for existing commands to "text commands" where it made sense to do so.
2022-01-30 22:26:33 -08:00