Verify incoming discord server users with Discord.py and Google Sheets API
Originally created for the CxC hackathon server to authorize incoming hackers to access private channels with roles.
This bot checks whether hackers are approved to participate in the hackathon, then whether they have registered as a member of the DSC club.
- Discord bot: add
DISCORD_TOKEN
andDISCORD_GUILD
to.env
file - Google Sheets: see https://developers.google.com/sheets/api/quickstart/go#authorize_credentials_for_a_desktop_application for
credentials.json
file - Discord server: add roles:
Verification Needed
,Verified
, andAdmin
, as required.
In the linked google sheet, create a first sheet containing a list of student ids and their Discord usernames. Then, in the second sheet, create a list of club members with their ids. Then, run the bot with a hosting service.
!verify
: Run by the user to be verified.!verifyall
: Run by admin users with theAdmin
role to accept all users in the linked Google Sheet.