A discord bot to gate the entry of a discord server on multiple passwords (each one giving a different role)
The use case is as follows:
- Send different people/groups the same discord link, with a different password.
- Each user is prompted for their password on entry. If they enter the correct password, they are given their appropriate role.
See requirements.txt
For development, see script/requirements.txt
- Ensure the
@everyonerole cannot see any channels by default. - Create a role named
Verifiedwhich can see the base channels (i.e. #general) - Create a role named
Unverified Volunteerwhich can see the volunteer onboarding channel. - Create a role named
Blueshirt. - Create a role named
Team Supervisor. - Create a new channel category called
welcome, block all users from reading this category in its permissions. - Create channel categories called
Team ChannelsandTeam Voice Channels. - Create a channel named
#blog, block all users from sending messages in it. - Set a Blueshirt password using
/passwd tla:SRZ new_password: - Make sure that the SRbot role is at the top of the role list (it can only assign roles below its own)
- Create teams using the
/team newcommand.
And voilà, any new users should automatically get their role assigned once they enter the correct password.
- Set up discord to the correct settings (see above)
- Register a discord bot.
- Copy
.envand fill it out with the application token and guild ID. In order to get the guild ID, you will need to enable developer mode in Discord's settings. Once enabled, right click the guild (server) in the sidebar and clickCopy Server ID. pip install .python -m sr.discord_bot- In the server settings, ensure the
/joincommand can be used by@everyonebut cannot be used by theVerifiedrole - Ensure the
/passwdcommands can only be used byBlueshirts