Commit Graph

47 Commits

Author SHA1 Message Date
spiral bf7747ab34 feat: split out messages table from main database 2022-11-23 09:17:19 +00:00
spiral 9303dbb91e refactor(bot): remove saving own user ID from ready event, rely on ID in config 2022-09-06 09:52:37 +00:00
spiral 5c055871e3 feat(bot): store command message info in redis 2022-06-19 20:28:55 -04:00
spiral 32a73eef09 feat: update to Discord API v10 2022-02-26 16:28:20 -05:00
spiral 89c44a3482 feat: cache Discord DM channels in database 2022-01-22 02:47:47 -05:00
spiral 50a24f03a7 refactor: only pass shard ID to event handlers instead of full shard object 2022-01-14 18:39:03 -05:00
spiral bf80dd0988 refactor: don't get user from cache in ReactionAdded 2022-01-14 15:29:15 -05:00
spiral 34df19c551 fix: don't delete rows from messages table when the associated member is deleted 2022-01-11 09:43:55 -05:00
spiral 56d07e0f2d feat: pk;config 2021-11-29 21:35:21 -05:00
spiral 1918c56937 feat: upgrade to .NET 6, refactor everything 2021-11-26 21:10:56 -05:00
spiral 7a5ba8246e refactor: cache own user ID in IDiscordCache
- remove Cluster.User
- remove Cluster.Application (it was only being used as an alternative to Cluster.User for some reason)
- move Bot.PermissionsIn to DiscordCacheExtensions
2021-11-21 19:42:35 -05:00
spiral 0efaab6d95 refactor: don't use 'out' in IDiscordCache methods
this change is required for async cache (.NET doesn't support async ref/out params)
2021-11-18 13:11:02 -05:00
spiral e7f36eb31f feat: async cache
this breaks logging bot permissions to Sentry.

we haven't had a need to check those recently (permissions issues were because of broken cache), so this is fine for now
this should be re-added in the future though
2021-11-17 20:41:02 -05:00
spiral 343fafe9f0 feat: respect Discord permissions in pk;message and pk;edit 2021-11-10 23:46:16 -05:00
spiral 92e45a07ff refactor: add SqlKata for SQL generation, move connection handling into ModelRepository 2021-09-29 21:51:38 -04:00
spiral d49b9f9bb7 ignore reactions added by the bot itself 2021-09-25 15:04:06 -04:00
spiral 42422f475b feat: allow deleting *any* message in DMs 2021-09-13 02:13:36 -04:00
Ske 9bbe9df16d Clean up a few database pool uses 2021-09-03 22:20:07 +02:00
spiral ac2671452d run dotnet format 2021-08-27 11:03:47 -04:00
spiral 52efb3c70a fix: don't check for useless permission when deleting command messages
this allows for deleting command messages in DMs, where the bot does not have manage messages permissions
and just in general in channels where it doesn't have those permissions as well
2021-08-25 12:43:33 -04:00
spiral a8727f474b Allow any linked account to edit/delete messages sent by the same system
Closes #375.
2021-07-27 11:39:37 -04:00
spiral afd8983abe fix the rest of the conditionals 2021-07-08 12:45:59 -04:00
spiral e620e30c10 Fix channel checks missing GuildNews
The log channel / logclean checks are left as-is; hopefully nobody is
using an announcements channel for their logs?
2021-07-08 09:17:35 -04:00
Ske 9e9eaa7450 Replace ping link embed with jump button 2021-06-11 18:17:08 +02:00
Ske 3196f60093 Fix error on DMing with no permission 2021-03-18 11:38:28 +01:00
Ske ccd12df996 Fix removing original reaction 2021-01-31 17:56:44 +01:00
Ske 9079f1c59c Port the DM stuff 2020-12-25 13:58:45 +01:00
Ske f6fb8204bb Add embed builder, some more ported classes 2020-12-23 02:19:02 +01:00
Ske a6fbd869be Initial commit, basic proxying working 2020-12-22 13:15:26 +01:00
Ske 634173e205 Update to D#+ 4.0.0-rc1 2020-11-15 13:53:31 +01:00
spiral 4aeda86d66 Fix deleting command messages by reaction in DMs 2020-11-04 11:30:00 -05:00
Ske 81cd5496d5 Refactor command message deletion 2020-10-23 12:18:28 +02:00
dev-kittens 56bb5e975f Add handling command reactions
and, uhh, rename invoker_id to author_id
2020-10-18 00:59:36 -05:00
Ske 20addea986 Ignore reactions on channels we don't have cached 2020-08-30 15:53:03 +02:00
Ske c7612df37e Major database refactor (again) 2020-08-29 13:46:27 +02:00
Ske 203dbc65a1 Replace most "code-escaped" literals with properly-escaping helpers 2020-08-25 22:44:52 +02:00
Ske d749876796 Workaround for permission errors when removing reactions 2020-07-18 13:07:16 +02:00
Ske c87e67245d Create GetXXX utils wrapping try blocks 2020-07-02 18:29:04 +02:00
Ske 3e297178c7 Hopefully fix user cache error in ReactionAdd 2020-06-24 16:47:34 +02:00
Ske 2c35649ef0 Use AllowedMentions to disable mentions everywhere by default 2020-06-20 17:33:10 +02:00
Ske ff7b728762 Merge branch 'feature/granular-privacy' 2020-06-20 16:25:08 +02:00
Ske 8df42f7d92 Ignore bot reactions 2020-06-18 17:49:43 +02:00
Ske 56eae82b0a Move most references to PKMember.Name to go through helper extepsions for privacy 2020-06-18 17:08:36 +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
Ske f97ceac1fb Refactor Sentry scope enrichment 2020-05-02 16:00:43 +02:00
Ske 999ea5f0b5 Refactor and simplify the main bot classes 2020-05-02 01:52:52 +02:00