Add automatic role assignment on member join for rules acknowledgment

- Introduced a new function `assign_rules_arrival_on_join` to assign the arrival role to members upon joining, based on configuration settings.
- Updated the `on_member_join` event to call the new function, enhancing the user experience by providing immediate role assignment.
- Modified configuration options in the web application to allow enabling or disabling this feature.
- Updated the configurations template to reflect the new role assignment behavior, ensuring clarity for users.
This commit is contained in:
2026-05-04 13:31:11 +02:00
parent 8634f946a1
commit 4e6f8bec3a
4 changed files with 50 additions and 3 deletions
+2 -1
View File
@@ -33,7 +33,7 @@ from discordbot.moderation import (
moderation_slash_say,
)
from discordbot.welcome import sendWelcomeMessage, sendLeaveMessage, updateInviteCache
from discordbot.rules_ack import register_persistent_rules_view, on_presentation_message
from discordbot.rules_ack import assign_rules_arrival_on_join, register_persistent_rules_view, on_presentation_message
from discordbot.patreon import checkPatreonPosts
from discordbot.youtube import checkYouTubeVideos
from discordbot.auto_rooms import on_voice_state_update_auto_rooms, on_raw_reaction_add_auto_rooms, on_message_auto_rooms, cleanup_orphaned_auto_rooms
@@ -254,6 +254,7 @@ async def on_raw_reaction_add(payload: discord.RawReactionActionEvent):
@bot.event
async def on_member_join(member: Member):
await assign_rules_arrival_on_join(bot, member)
await sendWelcomeMessage(bot, member)
@bot.event