Ske
c927967c3b
Migrate GetSystemById
2020-06-13 19:42:04 +02:00
Ske
90ac186183
Extract Database to interface
2020-06-13 19:36:43 +02:00
Ske
2038f023a0
Move count stat collecting to raw SQL
2020-06-13 19:15:29 +02:00
Ske
e176ccbab5
Several more database-y refactors
...
- DbConnectionFactory renamed to "Database", will now be the primary entry point for DB stuff
- Created IPKConnection interface mostly containing async extensions to IDbConnection, use this going forward
- Reworked the Connection/Command wrappers (that have performance/logging extensions)
- Probably more stuff that I forgot???
2020-06-13 18:31:20 +02:00
Ske
a915ddb41c
Extract system/member guild settings and refactor DB access
...
(also refactor MemberAvatar now that I'm here)
2020-06-13 16:03:57 +02:00
Ske
3d62a0d33c
Split message/proxy data up in MessageContext and ProxyMember
2020-06-12 23:13:21 +02:00
Ske
ba441a15cc
Too many refactors in one:
...
- Allowed adding ephemeral(ish) views and functions
- Moved message_count to a concrete database field
- Moved most proxy logic to a stored procedure
- Moved database files around and refactored schema manager
2020-06-12 20:29:50 +02:00
Ske
49acc4d9e2
Refactor proxy handling code
...
- Move reaction handlers to the ReactionAdded event instead of
ProxyService
- Split tag matching off into ProxyTagParser
- Split autoproxy matching off into Autoproxier
- General cleanup and simplification
2020-06-11 23:22:53 +02:00
Astrid
4a4d980349
Merge pull request #177 from acw0/bugfix/tag-markdown
...
Properly show tags containing markdown in system embed
2020-06-11 21:35:28 +02:00
Ske
67e55736f0
Still remove the reaction even if pings are disabled
2020-06-11 21:33:44 +02:00
Ske
ccb6ba5d30
Minor renames and rewordings
2020-06-11 21:32:04 +02:00
Lillian Berry
59af6f02e8
Add disabling reaction pings
2020-06-11 21:19:40 +02:00
Astrid
216dfffe58
Merge pull request #181 from acw0/fix-emojis
...
Fix emoji variation selector issue
2020-06-11 21:13:07 +02:00
ariel w
82886fe9e2
Move discord links to new domain ( #180 )
2020-06-11 21:12:43 +02:00
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
acw0
5714c18668
Fix emoji variation selector issue
2020-06-05 18:34:24 -04:00
Ske
ae74dce2ce
Make sure we only attach shard listeners once
2020-05-31 03:19:42 +02:00
Ske
d657e9813d
Properly handle executing missing webhooks
2020-05-23 01:51:02 +02:00
acw0
f55c638f41
Properly show tags containing markdown in system embed
2020-05-15 07:32:28 -04:00
Ske
792acad50a
Don't try to parse webhook error if error isn't JSON
2020-05-12 22:19:49 +02:00
Ske
b9a89a1037
Fix handling lack of DM permissions when react-querying
2020-05-12 21:31:59 +02:00
Ske
60018bf69d
Don't send ping message if bot doesn't have permissions
2020-05-12 21:26:37 +02:00
Ske
a3517f8663
Refactor order of shard initialization
2020-05-12 21:26:37 +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
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
e298f6f652
Add support for SafetyAtLast bot
2020-05-02 20:42:42 +02:00
Ske
720755844f
Rename BotHasPermission to a more descriptive name
2020-05-02 15:29:36 +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
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
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
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
9fa36b78ff
Fix the garish default D#+ colors
2020-04-29 00:25:01 +02:00
Ske
35e30f481b
Fix error in stats collection task
2020-04-29 00:04:53 +02:00
Fennel
ebaded4bbd
Fix Proxied Messages Ignored
2020-04-28 22:30:11 +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
02e2c9314b
Update webhook rate limit code
2020-04-16 22:30:13 +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
fa70df8f98
Add proper webhook rate limit support
2020-03-27 00:01:42 +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
35b0659d05
Don't ping by reaction if sender doesn't have permissions
2020-03-04 18:39:51 +01:00
Ske
e49f2850c6
Add support for Vanessa log cleaning
2020-03-04 18:32:14 +01:00
Ske
ee3ac44664
Properly handle 5xx errors from webhook calls
2020-02-26 19:47:30 +01:00
Ske
eefbf0630e
Fix fuzzy log clean match error with multiple messages
2020-02-22 20:08:20 +01:00
Ske
8d3be79d33
Don't attempt to send log messages if the bot doesn't have permissions
2020-02-22 01:54:10 +01:00
Ske
de141d629b
Fix newline rendering in embeds on iOS
2020-02-20 22:57:37 +01:00
Ske
456fe8f7af
Ignore weirdly formatted server errors too
2020-02-19 01:00:23 +01:00
Ske
55671b45d6
Add support for UnbelievaBoat
2020-02-15 14:17:25 +01:00
Ske
ccf81b0826
Add support for Pancake
2020-02-15 14:17:25 +01:00
Ske
e9cc8ed424
Add logger bot cleanup support
2020-02-15 14:17:25 +01:00
Ske
e70236b9c0
Send member card on proxy query
2020-02-15 00:12:46 +01:00
Ske
48342a2890
Fix spurious empty-string-description errors
2020-02-12 23:18:31 +01:00
Ske
dc10a8411a
Disable autoproxy retriggering on edit
2020-02-12 17:44:24 +01:00
Ske
d0d3579b17
Add server-specific member avatars
2020-02-12 17:42:12 +01:00
Ske
6d5004bf54
Large refactor and project restructuring
2020-02-12 15:16:19 +01:00
Ske
1d3acb2392
Fix error when trying to DM a user with DMs disabled
2020-02-12 14:22:15 +01:00
Ske
1386e6743b
Proxy edited messages if the message is the last one in the channel, and the edit introduces proxy tags where there were none previously
2020-02-12 14:21:48 +01:00
Ske
9d0af7f22a
Fix image proxying with empty messages
2020-02-09 15:27:52 +01:00
Ske
3ce1078dc6
Add different text for systems with no members
2020-02-05 23:43:30 +01:00
Ske
f27e864731
Fix autoproxying someone else's bare tags
2020-02-03 16:10:43 +01:00
Ske
6863da9462
Disable Discord member caching entirely
2020-02-01 15:00:36 +01:00
Ske
82dfe43d5a
Rework caching
...
This does a *lot* of things. Essentially, it replaces the existing
individual proxy- and autoproxy caches on the bot end with a
global cache (in Core) that handles all the caching at once, and
automatically invalidates the cache once something changes in the
datastore.
This allows us to do proxying and autoproxying with *zero database
queries* (best-case).
2020-02-01 14:40:57 +01:00
Ske
3ba6a115f0
Correct autoproxy escape character
2020-01-25 17:40:41 +01:00
Ske
83cfb3eb46
Add autoproxy functionality
2020-01-24 20:28:48 +01:00
Ske
b347d2d557
Add front history pagination; upgrade more store methods
2020-01-18 00:58:35 +01:00
Ske
8a689ac0f2
Upgrade various store methods to IAsyncEnumerable
2020-01-18 00:02:17 +01:00
Ske
98613c4287
Add system and member privacy support
2020-01-11 16:51:13 +01:00
Ske
cb1c44a27f
Bail early if we don't have send message permission when proxying
2020-01-08 12:16:27 +01:00
Ske
73b2631280
Optimize database queries for proxy filtering
2019-12-28 12:00:52 +01:00
Ske
4d07886ec8
Add server-specific display names
2019-12-26 20:39:47 +01:00
Ske
633627c30a
Fix image-only proxies where the tags have trailing/leading spaces
2019-12-26 19:19:06 +01:00
Ske
5ff32ea6b4
Re-enable proxy attachments
2019-12-23 13:55:43 +01:00
Ske
58cdb04ab9
Practice better disposal hygiene
2019-12-23 01:58:10 +01:00
Ske
3fdfaeab01
Disable message attachments as a temporary fix
2019-12-23 01:53:01 +01:00
Ske
affb42160a
Oops pt. 3
2019-12-23 00:35:42 +01:00
Ske
de75752b5e
Oops pt. 2
2019-12-23 00:35:25 +01:00
Ske
05282fd167
Reuse a singleton HttpClient for proxying
2019-12-23 00:29:04 +01:00
Ske
3c95f35553
Reduce timeouts on webhook invocations
2019-12-22 22:56:18 +01:00
Ske
cb836d5f7e
Remove the ping reaction afterwards
2019-12-22 14:44:14 +01:00
Ske
639c813ce7
Add per-server per-system proxy enable toggle
2019-12-22 14:15:56 +01:00
Ske
857b0488b9
Add member pinging by reaction
2019-12-22 13:54:18 +01:00
Ske
bd8fb40bc7
Handle systems with (too) many linked accounts
2019-12-22 13:53:38 +01:00
Ske
992a37dd1b
Lower logging level of proxy cache messages
2019-12-22 12:50:56 +01:00
Ske
b81eda47aa
Expand pk;stats functionality
2019-12-22 12:50:47 +01:00
Ske
d42dea9e9f
Allow multiple proxy attachments
2019-12-21 20:07:51 +01:00
Ske
474d561c54
Execute webhooks directly rather than through D.NET
2019-12-21 18:50:28 +01:00
Ske
378cba09e5
Add channel blacklists for logging and proxying
...
Necessary database migrations for this commit:
alter table servers add column log_blacklist bigint[] not null default array[]::bigint[];
alter table servers add column blacklist bigint[] not null default array[]::bigint[];
2019-11-03 19:15:50 +01:00
Ske
520e6f140c
Fix front history lookup with very long switches
2019-11-03 00:46:38 +01:00
Ske
6c39b7549b
Fix message querying actually for real
2019-10-31 21:14:01 +01:00
Ske
f4a5b409c3
Fix message querying for real this time
2019-10-31 16:36:33 +01:00