This bot is used to gate the Class of 2028 Discord Server so only folks with verified Purdue emails can join. It is written in Bun and uses Elysia, discord.js, and HTMX.
- Clone this repository
- Run
bun install
to install all dependencies. - Run
turso db create [dbname]
to create a new database. - Run
turso db tokens create [dbname]
to create a new database token. - Run
turso db show [dbname]
to get the database URL. - Run
bun gen:paserk
to generate a new Paserk keypair. - Create a
.env
file with the following contents:
COOKIE_SECRET=
DISCORD_BOT_TOKEN=
DISCORD_CLIENT_ID=
DISCORD_CLIENT_SECRET=
DISCORD_REDIRECT_URI=
PASERK_PUBLIC_KEY=
PASERK_SECRET_KEY=
RESEND_API_KEY=
TURSO_AUTH_TOKEN=
TURSO_CONNECTION_URL=
- Run
bun db:migrate
to run all migrations upwards. - Run
bun dev
to start the server.
- Visit the
/
page to get redirected to log in with Discord. - Once logged in, you will be be asked to input your Purdue email.
- You will receive an email with a verification link.
- Click the verification link to verify your email.
- You will be redirected back to the Discord server.