Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement: Make welcome message configurable #67

Open
JacobCoffee opened this issue Feb 28, 2024 · 0 comments
Open

Enhancement: Make welcome message configurable #67

JacobCoffee opened this issue Feb 28, 2024 · 0 comments
Labels
byte 🤖 Related to the Byte bot service database 📦 Related to the Byte database service enhancement ➕ This is a brand new feature or request good first issue 🥈 Good for newcomers help wanted 🆘 Extra attention is needed

Comments

@JacobCoffee
Copy link
Owner

JacobCoffee commented Feb 28, 2024

Summary

The member join event for a guild should be configurable by server owners.

Basic Example

Here:

byte/src/byte/bot.py

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."
)
should be updated to something like:

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


Note

We utilize Polar.sh to engage in regular as well as pledge-based > sponsorship.

Check out all issues funded or available for funding on our Polar.sh dashboard

  • If you would like to see an issue prioritized, make a pledge towards it!
  • We receive the pledge once the issue is completed & verified
  • This, along with engagement in the community, helps us know which features are a priority to our users.
Fund with Polar
@JacobCoffee JacobCoffee added enhancement ➕ This is a brand new feature or request help wanted 🆘 Extra attention is needed good first issue 🥈 Good for newcomers byte 🤖 Related to the Byte bot service database 📦 Related to the Byte database service labels Feb 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
byte 🤖 Related to the Byte bot service database 📦 Related to the Byte database service enhancement ➕ This is a brand new feature or request good first issue 🥈 Good for newcomers help wanted 🆘 Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant