-
-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
byte π€Related to the Byte bot serviceRelated to the Byte bot servicedatabase π¦Related to the Byte database serviceRelated to the Byte database serviceenhancement βThis is a brand new feature or requestThis is a brand new feature or requestgood first issue π₯Good for newcomersGood for newcomershelp wanted πExtra attention is neededExtra attention is needed
Description
Summary
The member join event for a guild should be configurable by server owners.
Basic Example
Here:
Lines 95 to 104 in e69751b
| async def on_member_join(self, member: Member) -> None: | |
| """Handle member join event. | |
| Args: | |
| member: Member object. | |
| """ | |
| await member.send( | |
| f"Welcome to {member.guild.name}! Please make sure to read the rules if you haven't already. " | |
| f"Feel free to ask any questions you have in the help channel." | |
| ) |
guild_service = await anext(provides_guilds_service(db_session))
_guild = await guild_server.get(pk=context.guild.id)
if _guild.welcome_members:
await member.send(
f"Welcome to {member.guild.name}! {_guild_.welcome_message}"
)and models.py:Guilds would have these fields added:
welcome_members: Mapped[bool] = mapped_column(default=True)
welcome_message: Mapped[str] = mapped_column(String(500), default="Please make sure to read the rules if you "
"haven't already. Feel free to ask any "
"questions you have in the help channel.")Drawbacks and Impact
No response
Unresolved questions
No response
Metadata
Metadata
Assignees
Labels
byte π€Related to the Byte bot serviceRelated to the Byte bot servicedatabase π¦Related to the Byte database serviceRelated to the Byte database serviceenhancement βThis is a brand new feature or requestThis is a brand new feature or requestgood first issue π₯Good for newcomersGood for newcomershelp wanted πExtra attention is neededExtra attention is needed