Commit Graph
100 Commits
Author SHA1 Message Date
Ske 3d69a00716 Fixed exceptions when fetching webhook list "sticking" in the cache
This happened because we cache Task instances, not the values, and a failed task is still a *valid* task that can repeatedly be awaited. This lead to the Task being saved even if it failed, and the same exception constantly being re-thrown.

This fix invalidates the cache if it finds a failed Task, and lets it retry fetching as normal (hopefully successfully this time).
2020-06-11 16:13:18 +02:00
Ske e7191def02 Split long short-list results up into embed fields 2020-06-07 19:52:05 +02:00
Ske c537dc7de3 Fix quotes in collate clause 2020-06-07 19:49:43 +02:00
Ske 1db46accce Potentially fix sort order with emojis 2020-06-07 19:31:41 +02:00
Ske e347928c02 Merge branch 'feature/sort-filter' 2020-06-07 16:36:42 +02:00
Ske 1ac5f9518e Mostly finished, needs to be double-checked/documented 2020-06-07 01:30:19 +02:00
Ske e8068cc1a9 Add avatar credit for June 2020-06-04 16:24:30 +02:00
Ske 7c85dc360b Barebones, untested sort/filtering 2020-06-04 13:21:47 +02:00
Ske d5c6e2baac Don't post an error after clearing avatar 2020-06-02 02:02:07 +02:00
Ske 62207a9255 Reduce flush to disk interval further 2020-05-31 03:22:41 +02:00
Ske ae74dce2ce Make sure we only attach shard listeners once 2020-05-31 03:19:42 +02:00
Ske fbbbb51998 Upgrade DSharpPlus version 2020-05-23 01:59:27 +02:00
Ske d657e9813d Properly handle executing missing webhooks 2020-05-23 01:51:02 +02:00
Ske 792acad50a Don't try to parse webhook error if error isn't JSON 2020-05-12 22:19:49 +02:00
Ske dee229b08c Ignore weird Nginx errors from Discord 2020-05-12 22:19:33 +02:00
Ske b9a89a1037 Fix handling lack of DM permissions when react-querying 2020-05-12 21:31:59 +02:00
Ske 8ea02dae81 Add more error reporting for Discord errors 2020-05-12 21:26:37 +02:00
Ske 60018bf69d Don't send ping message if bot doesn't have permissions 2020-05-12 21:26:37 +02:00
Ske 65bac86ac1 Only update status if we've received a Ready 2020-05-12 21:26:37 +02:00
Ske a3517f8663 Refactor order of shard initialization 2020-05-12 21:26:37 +02:00
AstridandGitHub 8188de7c97 Merge pull request #169 from ParanormalVibe/master
Add workaround for DSharpPlus/DSharpPlus#575
2020-05-11 09:01:22 +02:00
Ske 9a761ed7e4 Add display name to long member list 2020-05-08 02:03:31 +02:00
Ske fd65846867 Extract the explanation from the help message into a separate command 2020-05-08 02:01:57 +02:00
Ske cb8234b272 Restructure message info embed queries
This fixes several long-standing issues wrt. handling of senders that are no longer on the server and deleted accounts, as well as an error handling issue caused by the DSharpPlus migration.
2020-05-08 00:57:17 +02:00
Ske 53582997f0 Ignore CloudFlare error response parsing errors 2020-05-07 23:59:05 +02:00
Ske e9a271ef60 Skip leading spaces when command parsing 2020-05-07 23:43:17 +02:00
Ske 668d249872 Add support for more smart quote types 2020-05-07 23:43:07 +02:00
Ske 599dfcc071 Enable XML comment support for Swashbuckle 2020-05-07 06:10:29 +02:00
Ske 5cc5a5b4a7 Add basic Swagger integration into ASP.NET
Only enabled in Development mode for now.
2020-05-07 05:14:31 +02:00
Ske c4c3eaf954 Integrate ApiVersioning library for ASP.NET 2020-05-07 04:40:08 +02:00
Ske db1ebd0a1d Fix OpenAPI schema ref examples for ReDoc 2020-05-07 01:45:13 +02:00
Ske 38e65b3971 Properly publish OpenAPI spec 2020-05-07 01:36:00 +02:00
Ske c3d439dc5f Properly handle duplicate message insertions to the database 2020-05-06 23:49:06 +02:00
Ske 356fb76cb2 Drop consecutive duplicate messages from the gateway 2020-05-06 23:48:45 +02:00
Ske cde495cd3a Add another delay to double-super-ensure the log buffers are flushed 2020-05-06 23:43:37 +02:00
Ske 1badfd9020 Add draft OpenAPI v3 definitions 2020-05-06 19:37:08 +02:00
Ske 892601110f Temporary workaround for https://github.com/DSharpPlus/DSharpPlus/issues/565 2020-05-05 19:10:33 +02:00
Ske c1d17c2944 Fix member avatar in log channel message 2020-05-05 19:05:52 +02:00
Ske ffa6faddd2 Clean up some log levels in CpuStatService 2020-05-05 18:12:45 +02:00
Ske 0b41b4f6b8 Add graceful shutdown on SIGKILL/SIGINT 2020-05-05 18:12:34 +02:00
Ske a052c8331c Properly pass exceptions to Sentry 2020-05-05 16:42:14 +02:00
Ske 0f64086c75 Properly save avatar_url in the API 2020-05-05 16:14:21 +02:00
Ske f803b9a392 Add a character limit to avatar URLs (256 for now) 2020-05-05 16:04:17 +02:00
Ske 2579683da9 Refactor interactive event handlers 2020-05-05 16:03:46 +02:00
Ske e9cc0c8fdf Fix wrong delete command in privacy docs. Closes #168. 2020-05-03 00:37:04 +02:00
Ske e298f6f652 Add support for SafetyAtLast bot 2020-05-02 20:42:42 +02:00
Ske ee9c87a29f Refactor permission utils to properly account for lack of channel access 2020-05-02 16:25:17 +02:00
Ske f97ceac1fb Refactor Sentry scope enrichment 2020-05-02 16:00:43 +02:00
Ske f927450352 Report bot permissions to Sentry 2020-05-02 15:45:45 +02:00
Ske 3fd89c1a45 Refactor TryParseMention function to use regexes 2020-05-02 15:43:07 +02:00
Ske cad5b71f14 Fix system lookup errors where user ID doesn't exist 2020-05-02 15:33:05 +02:00
Ske 720755844f Rename BotHasPermission to a more descriptive name 2020-05-02 15:29:36 +02:00
Ske ca57d10f7c Change formatting of shard number in status 2020-05-02 14:25:28 +02:00
AstridandGitHub c551533313 Merge pull request #167 from acw0/master
Add current shard ID in status message
2020-05-02 14:22:03 +02:00
Ske 7099882277 General updates and improvements to README.md 2020-05-02 14:12:53 +02:00
Ske 999ea5f0b5 Refactor and simplify the main bot classes 2020-05-02 01:52:52 +02:00
Ske 7488ca459b Hopefully fix shard info tracking (again) 2020-05-01 20:27:51 +02:00
Ske 91c2eb3992 Fix plain-text logging output file 2020-05-01 20:13:15 +02:00
Ske 91b60367f0 Hopefully fix error in LogClean module 2020-05-01 19:41:15 +02:00
Ske e7b28261b2 "Properly" handle CloudFlare errors in webhook execution 2020-05-01 19:21:02 +02:00
Ske b927d0c2b7 Remove a few unnecessary extensions 2020-05-01 17:38:16 +02:00
Ske 48833639e2 Update shard status tracker for new library 2020-05-01 17:30:12 +02:00
Ske d0f1aeb548 Fix member lookup in SanitizeEveryoneMaybe 2020-05-01 17:03:43 +02:00
Ske e133bd657d Remove log channels if they don't exist 2020-05-01 16:36:21 +02:00
Ske 7e43b75f97 Fix errors on eg. incoming link embed update events 2020-05-01 15:41:37 +02:00
Ske e4ebd2a5fe Merge branch 'refactor/dsharpplus'
It's heeeeeeeere~
2020-05-01 15:21:55 +02:00
Ske 546cb7f97a Remove webhook rate limit cache
The move to DSharpPlus makes it unnecessary, as D#+ can actually do webhook invocations on its own.
2020-05-01 00:00:33 +02:00
Ske 042327d4aa Add online user counting back (ish) 2020-04-30 23:55:12 +02:00
Ske 697a24c4fa Remove unused assignment 2020-04-29 02:35:46 +02:00
Ske 12aef1f61d Refactor periodic event loop 2020-04-29 01:14:49 +02:00
Ske 483a9d6ed9 Save log file as both text and JSON 2020-04-29 00:25:31 +02:00
Ske 9fa36b78ff Fix the garish default D#+ colors 2020-04-29 00:25:01 +02:00
Ske 86b6a90b1c Add proper credit to MentionUtils 2020-04-29 00:06:40 +02:00
Ske 9b6f79a508 Factor DiscordConfiguration out into DI 2020-04-29 00:05:26 +02:00
Ske 35e30f481b Fix error in stats collection task 2020-04-29 00:04:53 +02:00
Ske 607a518cb8 Fix permchecking other guilds than the one you're in 2020-04-28 22:56:43 +02:00
Ske 1ef798e399 Add a script to spawn a local testing database 2020-04-28 22:07:05 +02:00
Ske 8cfb1b01ab Hide channels from pk;permcheck if user does not have view permissions 2020-04-28 22:06:48 +02:00
Ske 5386f24b69 Fix permissions check when proxying 2020-04-22 09:27:55 +02:00
Ske 23cf06df4c Port some things, still does not compile 2020-04-17 23:10:01 +02:00
Ske f56c3e819f Replace Discord.Net with DSharpPlus
This commit will not compile.
2020-04-17 18:38:12 +02:00
Ske 02e2c9314b Update webhook rate limit code 2020-04-16 22:30:13 +02:00
Ske ab8382dffe Load proper config file for non-Docker API 2020-04-16 22:03:23 +02:00
Ske 4fe40b220e Optimize latch-mode autoproxy query 2020-04-16 18:23:56 +02:00
Ske 05595329b5 Collect metrics about webhook rate limit cache size 2020-04-16 18:20:53 +02:00
Ske 93bf7c6543 Add periodic garbage collection of webhook rate limit cache 2020-04-16 18:18:08 +02:00
Ske 93e53be7db Bump member count limit for the time being 2020-04-09 17:25:01 +02:00
Ske 4701f4b56c Add proper logging of startup errors 2020-03-27 00:02:56 +01:00
Ske fa70df8f98 Add proper webhook rate limit support 2020-03-27 00:01:42 +01:00
Ske 12d29eba44 Fix wrong message in privacy lookup 2020-03-09 11:00:28 +01:00
Ske 0eb2e8be6f Skip messages before current user ID is established 2020-03-08 11:10:05 +01:00
Ske 20789411f6 Cancel early when rate limited 2020-03-08 11:06:08 +01:00
Ske f8d0fb2f4b Properly ignore invalid server-side data when executing webhooks 2020-03-08 10:55:47 +01:00
Ske 0f8786143f Ignore database shutting down errors 2020-03-08 10:55:33 +01:00
Ske 8b55e1364d Properly sanitize raw member description output 2020-03-08 10:34:47 +01:00
Ske a1d91784a0 Fix importing older export files 2020-03-07 17:30:22 +01:00
Ske 329a337518 Merge branch 'master' of github.com:xSke/PluralKit 2020-03-07 17:23:22 +01:00
Ske c6e813853a Remove "a" keyword for pk;find 2020-03-05 19:08:32 +01:00
Ske 884d6e1925 Add pk;find to the command list 2020-03-05 19:08:11 +01:00
AstridandGitHub 3ba6bc3224 Fix initializing postgres on first startup (#153) 2020-03-05 16:51:35 +01:00