Closed tech-lead-humanID closed 4 months ago
The changes in bot/discordbot.py
primarily focus on restructuring role permissions within a Discord bot. The updates include blocking unverified users from accessing channels, setting specific permissions for the everyone
and humanID-Verified
roles, and allowing general access for the everyone
role in a designated channel. These modifications enhance the bot’s ability to manage user permissions dynamically upon server join and during user registration.
Files | Change Summary |
---|---|
bot/discordbot.py |
Blocked unverified users from messages, set permissions for everyone and humanID-Verified roles, updated channel overwrites, modified admin user check in the register function. |
sequenceDiagram
participant User
participant Bot
participant DiscordServer as Discord Server
participant Channel
Note over Bot: on_guild_join event
Bot->>DiscordServer: On server join
DiscordServer->>Bot: Provide guild information
Bot->>Channel: Apply permissions
Channel->>Unverified Users: Block read/write access
Channel->>Everyone: Allow read/write in specific channel
Channel->>Verified Users: Allow read/write in all channels
Note over Bot: register command
User->>Bot: /register
Bot->>DiscordServer: Check interaction
Bot->>User: Verify registration
Bot->>DiscordServer: Update permissions
In Discord's realm, the bot now stands tall,
With roles and rules to manage all.
Unverified users, please take your seat,
Verified ones, enjoy the treat!
Channels set with care and might,
Ensuring everyone's presence is just right.
🎉✨🐇
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
everyone
andhumanID-Verified
roles.everyone
role to view/send messages in a specific channel.