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
@everyone
role cannot see any channels by default. - Create a role named
Verified
which can see the base channels (i.e. #general) - Create a role named
Unverified Volunteer
which 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 Channels
andTeam 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 new
command.
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
.env
and 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
/join
command can be used by@everyone
but cannot be used by theVerified
role - Ensure the
/passwd
commands can only be used byBlueshirt
s