A delcarative method to manage user role mappings for a Discord server. Roles and role permissions are to be managed via Discord client, but any role-user mappings should only be altered through accord.
NOTE: Before anything, make sure your Developer Mode is enabled in your Discord client.
Adding users:
/modules/users/
, create a file <github-username.tf>
data
source of type discord_member
with YOUR discord user ID. (right click on your name in discord, there will be an option to Copy ID
)resource
of type discord_member_roles
and map your user with the role(s) you wantAdding roles:
/modules/roles/
, add a role in roles.tf
(this role has to exist in the discord server!)__base.tf
for the newly added roleTF_VAR_DISCORD_SERVER_ID
TF_VAR_DISCORD_TOKEN
// TODO (via GitHub Actions)