Creates "event hooks" concept; other parts of protohaven_api can register things to do on certain Discord events (currently on_member_join, or when the bot is DM'd TEST_MEMBER_JOIN). This is configured by config.yaml / environment flags.
Fix bug where neon accounts without membership but with discord association would trigger an association request
Created setup_discord_user and a synchronous version (setup_discord_user_sync) which manages association requests, nickname changes, and role changes for an individual discord user. The async version is called via event hook in Discord, and the sync version is called (in a daemon thread, ironically) upon nickname submission in the API server /members page.
@everyone role is now ignored, since we don't have control over it.
Nickname resolution trailing whitespace is stripped (e.g. if last name is empty")
on_member_join
, or when the bot is DM'dTEST_MEMBER_JOIN
). This is configured by config.yaml / environment flags.setup_discord_user
and a synchronous version (setup_discord_user_sync
) which manages association requests, nickname changes, and role changes for an individual discord user. The async version is called via event hook in Discord, and the sync version is called (in a daemon thread, ironically) upon nickname submission in the API server/members
page.@everyone
role is now ignored, since we don't have control over it.