Closed tech-lead-humanID closed 2 months ago
The recent changes enhance the backend configuration and the Discord bot's role management capabilities. A new environment variable for web exchange URLs adds flexibility to the configuration. In the Discord bot, error handling is improved for role management, ensuring graceful user feedback and robust permission checks. Additionally, a development environment setting for real-time logging has been introduced, improving the development experience.
Files | Change Summary |
---|---|
backend/.env.example | Added PYTHON_WEB_EXCHANGE_URL to enhance configuration options; existing variables unchanged. |
backend/api/views.py | Replaced hardcoded URL with env.get_value("PYTHON_WEB_EXCHANGE_URL") for dynamic endpoint configuration. |
bot/discordbot.py | Enhanced setupVerifiedRole and verify functions with error handling for permission issues in role management. |
docker-compose.dev.yml | Added - PYTHONUNBUFFERED=1 for real-time logging during development, improving visibility of application logs. |
sequenceDiagram
participant User
participant Bot
participant DiscordAPI
User->>Bot: Request role verification
Bot->>DiscordAPI: Check if 'humanID-Verified' role exists
alt Role exists
Bot->>DiscordAPI: Add role to user
DiscordAPI-->>Bot: Confirmation
else Role does not exist
Bot->>Bot: Call setupVerifiedRole
Bot->>DiscordAPI: Create 'humanID-Verified' role
DiscordAPI-->>Bot: Role created
Bot->>DiscordAPI: Add role to user
DiscordAPI-->>Bot: Confirmation
end
🐰 In the garden of code, changes bloom,
New paths for the bot, dispelling the gloom.
Roles now dance with permission's grace,
A web exchange URL finds its place.
With logs flowing freely, our devs sing,
Together we thrive, let the coding bells ring! 🎶
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Summary by CodeRabbit
New Features
Bug Fixes