generated from nhcarrigan/template
536cf6e7f9
Implemented automatic Discord role assignment for users who are members of the NHCarrigan server. This happens on every login: - Check if user is in Discord server (ID: 1354624415861833870) - Fetch user's current roles via Discord API - Assign library member role if they don't have it yet - Graceful error handling without blocking login Uses Discord Bot API with proper permissions to manage roles. Similar pattern to badge refresh on login. Environment variables added: - DISCORD_BOT_TOKEN: Bot token for Discord API calls - LIBRARY_ROLE_ID: Role ID to assign (1474616681023279236)