Commit Graph

68 Commits

Author SHA1 Message Date
Fennel
ebaded4bbd Fix Proxied Messages Ignored 2020-04-28 22:30:11 +02:00
Ske
23cf06df4c Port some things, still does not compile 2020-04-17 23:10:01 +02:00
Ske
35b0659d05 Don't ping by reaction if sender doesn't have permissions 2020-03-04 18:39:51 +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
e70236b9c0 Send member card on proxy query 2020-02-15 00:12:46 +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
9d0af7f22a Fix image proxying with empty messages 2020-02-09 15:27:52 +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
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
05282fd167 Reuse a singleton HttpClient for proxying 2019-12-23 00:29:04 +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
d42dea9e9f Allow multiple proxy attachments 2019-12-21 20:07:51 +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
49dc25ee02 Allow keeping proxy tags when proxying messages.
Required database migration:

Closes #75.
2019-10-30 09:26:50 +01:00
Ske
b50c123ad4 Properly sort proxies before matching 2019-10-30 08:30:58 +01:00
Ske
393ee16c1b Add support for multiple proxy tags
Tangentially closes #103.
2019-10-30 08:18:59 +01:00
Ske
6a73b3bdd6 Refactor data stores, merging the Store classes 2019-10-26 19:45:44 +02:00
Ske
1988b29fbc Refactor command system 2019-10-05 07:41:00 +02:00
Ske
74e0508065 Increase webhook name limit to 80 2019-08-14 07:16:48 +02:00
Ske
145ecb91ad Refactor proxy service 2019-08-12 05:47:55 +02:00
Ske
17c8b7b765 Properly retry client creation on failure 2019-08-12 04:42:16 +02:00
Ske
5b13c1b100 Cache the entire webhook client rather than just the token 2019-08-12 04:32:01 +02:00
Ske
1b32cd8b6d Log webhook send progress 2019-08-12 04:16:17 +02:00
Ske
aa04d2055e Avoid deleting messages from the store if they're not webhooks 2019-08-12 03:51:54 +02:00
Ske
423d23faf7 Cache account lookup in memory when proxying 2019-08-12 03:48:08 +02:00
Ske
a689d61788 Collect webhook response time and shard latency 2019-08-12 00:57:23 +02:00
Ske
200ba6d84c Add member proxy display names 2019-08-09 10:12:38 +02:00
xBelladonna
fabf772085 Return original message ID to log channel
Logs the original (deleted) message's ID in addition to the proxied message's ID to the log channel if configured
2019-08-08 11:01:36 +02:00
Ske
59dbc5368b Filter everyone/here pings if the proxy sender doesn't have permission 2019-07-28 15:38:41 +02:00
Ske
defbf37cfe Fall back to system avatar when no member avatar is set 2019-07-26 11:08:06 +02:00
Ske
b14666aa4f Store the ID of the trigger message in the database 2019-07-24 13:38:54 +02:00
Ske
11eabe2e3d Update D.NET version and add bulk deletion support 2019-07-21 17:16:04 +02:00
Ske
45f468fe21 Properly clean up after proxy operations 2019-07-21 04:27:04 +02:00
Ske
52962f1b97 Bounds check proxy tags before extracting inner message 2019-07-19 02:14:46 +02:00
Ske
1577eb7041 Log channel ID rather than name 2019-07-18 17:29:09 +02:00
Ske
961bfe9094 Add basic logging framework 2019-07-18 17:13:42 +02:00