Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 18, 2025

Users' Discord nicknames can drift from their authenticated Albion Online character names over time. This adds background verification to detect and report mismatches.

Implementation

Background task

  • Runs hourly, discovers all members with the configured auth role
  • Automatically adds missing users to verified_users config
  • Checks users not verified in 24h
  • 2s delay between API calls for rate limiting
  • Gracefully handles member/API unavailability

Storage

verified_users = {
    "user_id": {
        "discord_id": 123456789,
        "albion_id": "abc123xyz",
        "name": "AlbionCharacterName",
        "last_checked": 1763425019.0
    }
}

Mismatch detection

  • Discord nickname ≠ current Albion API name
  • Player no longer exists in Albion API

Reporting

  • DM to bot owner with guild/user/mismatch details
  • Auto-splits messages >2000 chars

Commands

.authset dailycheck <bool> - Enable/disable per guild (default: enabled)

.authset checkuser @user - Manual verification for debugging

Config changes

Adds guild-level config:

  • verified_users: Dict tracking authenticated users with Discord ID, Albion ID, name, and last checked timestamp
  • enable_daily_check: Boolean toggle
  • Stores user data on .auth command

Backward Compatibility: Users authenticated before this feature are automatically discovered and tracked if they have the configured auth role. No manual re-authentication required.

Original prompt

in albion auth add support for regularly checking names still match, attempting to check each user once a day but without checking everyone at once,

it should create a report of mismatches and dm the bot owner


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 2 commits November 18, 2025 00:15
Co-authored-by: psykzz <1134201+psykzz@users.noreply.github.com>
Co-authored-by: psykzz <1134201+psykzz@users.noreply.github.com>
Copilot AI changed the title [WIP] Add support for checking user names regularly Add automated daily verification of Discord nicknames against Albion Online names Nov 18, 2025
Copilot AI requested a review from psykzz November 18, 2025 00:22
Copilot finished work on behalf of psykzz November 18, 2025 00:22
@psykzz
Copy link
Owner

psykzz commented Nov 18, 2025

@copilot Instead of checking verified users from the config, we should check every guild member that has the "Verified" role, which was previously given.

We should update users in the verified users config, even if they were missing previously.

…D, and name

Co-authored-by: psykzz <1134201+psykzz@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Nov 18, 2025

@copilot Instead of checking verified users from the config, we should check every guild member that has the "Verified" role, which was previously given.

We should update users in the verified users ...

Updated in commit 86b0b6c. The bot now:

  • Checks all guild members with the auth role (instead of just verified_users config)
  • Automatically adds missing users to the config when discovered
  • Searches Albion API to get their Albion ID and name
  • Stores discord_id, albion_id, name, and last_checked for each user

Users authenticated before this feature will now be automatically tracked.

Copilot finished work on behalf of psykzz November 18, 2025 00:32
@psykzz psykzz marked this pull request as ready for review November 18, 2025 01:19
@psykzz psykzz merged commit 25d6a31 into main Nov 18, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants