This is a Discord bot to update user entity in database when role has been added to/removed from user in Discord.
- In
Privileged Gateway Intents
turn onServer Member Intent
.
- Create a new user
create user activist_bot with encrypted password 'mypass';
- Grant him permission to select specified columns and update only
activist
column
GRANT select("id", "githubId", "discord", "activist"), UPDATE ("activist") ON "user" TO activist_bot;
- Specify
DB_HOST
,DB_NAME
,DB_USER
,DB_PASSWORD
in.env
file