dignityofwar / diglet-bot

TypeScript Discord bot serving the Dignity of War community.
1 stars 0 forks source link

Albion: Warning system bugs #43

Open Maelstromeous opened 9 months ago

Maelstromeous commented 9 months ago
  1. It's not detecting users registering to the server and marking them as registered properly
  2. It's not detecting members who have left / been booted from the guild correctly
Maelstromeous commented 9 months ago

Create a function that simply scans the guild. In this function is the following:

  1. Send an API call off to the Albion Online guild members endpoint
  2. Call database to grab all currently on record members
  3. Filter between the two lists
    • The difference should be the people who have left the guild. Optionally validate this case by sending an API call off to the character endpoint to double check they actually left
  4. If they've left, remove their record out of the guild table, removing their DC roles at same time
  5. If they are a new member, add their record in the database as unregistered
  6. Should someone registered before the scan is complete, validate they're actually in the guild via character endpoint and then enter them into the guild data database as a registered member. The next scan should pick up.