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

Example: Auto roles & member editing using revolt.py #90

Open
ksIsCute opened this issue Nov 29, 2024 · 0 comments
Open

Example: Auto roles & member editing using revolt.py #90

ksIsCute opened this issue Nov 29, 2024 · 0 comments

Comments

@ksIsCute
Copy link

This is used in my current bot, shoutout to bobbobs for suggesting I make it an example.
i have an example of configurable auto roles but its alot of bloat-y variables that do other things (like in-text variables and whatnot)

async def on_member_join(self, member: revolt.Member):
    if member.server.id == "SERVER ID":
        role = member.server.get_role("ROLE ID OF ROLE IN SERVER")
        await member.edit(roles=[role])
        channel = Client.get_channel(self, "CHANNEL ID OF CHANNEL IN SERVER")
        await channel.send(f"Welcome {member.mention} to the server!")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant