64 Commits
Author SHA1 Message Date
Leander Furumo 98006a51dc stop db event listener on cog unload 2024-05-08 00:05:14 +02:00
Leander Furumo 100aaf26ba convert static discord ids from .env to int 2024-04-29 23:45:02 +02:00
Leander Furumo 90fc0c37a1 remove redundant models and fields 2024-04-22 02:43:15 +02:00
Leander Furumo 11a8b33285 log at root level instead of 'discord' level 2024-04-22 02:41:22 +02:00
Leander Furumo 1762125788 change return type of fetch_all_galtinn_roles
since member and volunteer roles are fetches independently of api we need to return them regardless of group status.
2024-04-22 02:39:19 +02:00
Leander Furumo b93b055a06 make utc datetime now naive 2024-04-22 02:32:37 +02:00
Leander Furumo 4c4a35d4f7 log completion of db listener trigger function 2024-04-22 02:08:48 +02:00
Leander Furumo 93bd59e62a replace deprecated datetime.utcnow 2024-04-22 02:06:32 +02:00
Leander Furumo 4c6fb019fe log roles to add and remove before attempting to do so 2024-04-22 02:03:51 +02:00
Leander Furumo aecddf7708 make sure member and volunteer roles are removed, even when a user does not have any groups 2024-04-22 02:02:19 +02:00
Leander Furumo b944550bd6 make active_member_card registration date optional 2024-04-22 01:55:55 +02:00
Leander Furumo 83a1a2966e log roles set instead role setter function instead of outside 2024-04-22 01:43:41 +02:00
Leander Furumo 8b5ac02b0f fix active_member_card type 2024-04-22 01:42:39 +02:00
Leander Furumo 616f987924 make membership order and end date optional 2024-04-22 01:40:04 +02:00
Leander Furumo a7f59bc89a include contact info in error page and remove contact from error messages 2024-04-22 01:15:07 +02:00
Leander Furumo 022e0ebce2 include contact info & rephrase success message 2024-04-22 01:14:31 +02:00
LBlend d70f6afb23 set emoji globally 2024-04-21 16:45:17 +02:00
Leander Furumo 60b34cc40f replace buggy galtinn delete confirmation button with no confirmation, for now 2024-04-20 13:57:47 +02:00
Leander Furumo ebca55efed fetch discord profiles instead of users in galtinn register 2024-04-20 13:57:02 +02:00
Leander Furumo c88e71fdb5 rewrite galtinn membership check loop using new util functions 2024-04-20 13:56:04 +02:00
Leander Furumo 6a2d8106d6 rewrite galtinn db listener using new util functions 2024-04-20 13:55:25 +02:00
Leander Furumo ce02c80455 add various galtinn util functions 2024-04-20 13:54:52 +02:00
Leander Furumo 5392274bde add discord object fetcher util functions
due to there being two separate ways of fetching discord objects, one from cache and one as an API call we want to call the latter one if not found in cache. To avoid repeating the same process multiple times I have packed it into functions for the objects in interest
2024-04-20 13:48:49 +02:00
Leander Furumo 287248cf8b use correct env names for hardcoded roles 2024-04-20 13:45:42 +02:00
Leander Furumo 171e33f1ec make success message more specific
specify that roles are only given if a user doesn't have them already
2024-04-20 13:44:36 +02:00
Leander Furumo f20612cc52 add models.py 2024-04-20 13:43:24 +02:00
Leander Furumo b537a9fd30 add galtinn active and member roles 2024-04-19 19:50:40 +02:00
Leander Furumo cb234764af write discord_id to galtinn on auth success 2024-04-19 19:49:16 +02:00
Leander Furumo cc12b32006 add auth token to galtinn user requests 2024-04-17 02:12:41 +02:00
Leander Furumo 10c22754b7 use new util functions 2024-04-16 04:24:41 +02:00
Leander Furumo 0c036765be initial role remover/adder util function 2024-04-16 04:23:46 +02:00
Leander Furumo 8fd3bf0651 initial get_roles util function 2024-04-16 04:23:22 +02:00
Leander Furumo d3011a6d55 initial fetch_galtinn_user util function 2024-04-16 04:22:36 +02:00
Leander Furumo 91d4c4015b move galtinn_group declaration 2024-04-15 20:16:03 +02:00
Leander Furumo 9f4cc931cb add GALTINN_AUTH_TOKEN env var 2024-04-15 20:14:28 +02:00
Leander Furumo 1af28ddcbb fix NOTIFY query
asyncpg does not allow for arguments in NOTIFY queries, hence we have to use f-strings
2024-04-15 20:12:32 +02:00
Leander Furumo 0f90e9bbf8 make sure ephemeral messages are actually ephemeral
oopsie woopsie we leaked the auth link. the security team is working very hard to fix this
2024-04-12 04:11:21 +02:00
Leander Furumo 02e3b0601f vertically center content 2024-04-12 03:55:30 +02:00
Leander Furumo f934ea3569 Closes #8 2024-04-12 03:35:23 +02:00
Leander Furumo b8f70479a9 Closes #3 2024-04-12 02:57:28 +02:00
Leander Furumo 16a319876b remove galtinn_user and galtinn_role db tables
will be replaced with galtinn API calls in the future™️
2024-04-12 01:16:43 +02:00
Leander Furumo 7e42a1ddb9 remove role management commands 2024-04-12 01:05:16 +02:00
Leander Furumo d0ea61a5be run pre-commit 2024-04-11 05:12:26 +02:00
Leander Furumo ba6bcbca8a Closes #7 2024-04-11 04:46:34 +02:00
Leander Furumo 6192bbd8d4 mark autocommit as scary 2024-04-11 02:35:43 +02:00
Leander Furumo 0e69fc43ed fetch roles in membership check 2024-04-11 02:35:21 +02:00
Leander Furumo e970498d10 add management commands for galtinn roles 2024-04-11 02:34:14 +02:00
Leander Furumo fff465fdc6 use discord role id as primary key for galtinn roles 2024-04-11 02:31:56 +02:00
Leander Furumo 31fed72e0e start membership check loop 2024-04-11 01:36:56 +02:00
Leander Furumo ab9a0adb4d add emergency verification table cleanup loop 2024-04-11 01:36:34 +02:00
Leander Furumo d2e014a9c5 add newline in success message 2024-04-11 01:11:14 +02:00
Leander Furumo 31b5f13cf8 improve variable naming 2024-04-11 01:10:44 +02:00
Leander Furumo 4fb6d98f8c fix typos 2024-04-11 01:10:14 +02:00
Leander Furumo 85713eb11a add state param 2024-04-11 01:08:59 +02:00
Leander Furumo 206c1fac91 use username instead of name for success page 2024-04-11 01:07:25 +02:00
Leander Furumo 0f4eb76845 add comments 2024-04-11 01:05:44 +02:00
Leander Furumo 92fa2ef7e3 suffix / to oauth api calls 2024-04-10 03:09:10 +02:00
Leander Furumo a6ca3fd361 change default port as to not conflict with galtinn 2024-04-10 03:07:21 +02:00
Leander Furumo 1689dd2aaf automatically delete user from verification table 2024-04-10 03:06:56 +02:00
Leander Furumo 6ee27bf528 stop catching redundant exception classes 2024-04-05 02:56:24 +02:00
Leander Furumo 27d42f4a37 avoid nesting if statements 2024-04-04 02:16:49 +02:00
Leander Furumo 1354cd7c81 add verification server to monorepo 2024-04-04 02:13:25 +02:00
Leander Furumo b38b44fce0 add discord bot to monorepo 2024-04-04 02:12:50 +02:00
Leander Furumo 034f47d101 initial 2024-04-04 02:12:21 +02:00