Implement Discord role assignment for Patreon synchronization - #32
Implement Discord role assignment for Patreon synchronization#32Rukafuu wants to merge 1 commit into
Conversation
- Add `addRoleToUser` to `DiscordService` to manage tier-exclusive roles - Update `PatreonService` to link patrons with LiraOS users by email - Pass `discordService` to `patreonService.syncWithDiscord` in routes - Add `DISCORD_GUILD_ID` to `.env.example` for targeted synchronization Co-authored-by: Rukafuu <111822334+Rukafuu@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
I have implemented the Discord role assignment logic for Patreon synchronization.
Key changes:
addRoleToUser(discordId, roleName)toChat/backend/services/discordService.js. This method fetches roles from the guild, removes any existing Patreon tier roles, and assigns the correct one to the user. It usesDISCORD_GUILD_IDfrom the environment if available.syncWithDiscordinChat/backend/services/patreonService.jsto look up LiraOS users by email and trigger the Discord role assignment if a linked account is found./sync-discordroute inChat/backend/routes/patreonRoutes.jsto pass thediscordServiceinstance to the synchronization logic.DISCORD_GUILD_IDtoChat/backend/.env.exampleas an optional configuration.The implementation ensures that patrons receive the correct Discord role corresponding to their tier and that multiple tier roles are not assigned simultaneously.
PR created automatically by Jules for task 14731408102525652173 started by @Rukafuu