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:
- In
/modules/users/
, create a file<github-username.tf>
- Add a
data
source of typediscord_member
with YOUR discord user ID. (right click on your name in discord, there will be an option toCopy ID
) - Add a
resource
of typediscord_member_roles
and map your user with the role(s) you want
Adding roles:
- In
/modules/roles/
, add a role inroles.tf
(this role has to exist in the discord server!) - Define a module output in
__base.tf
for the newly added role
TF_VAR_DISCORD_SERVER_ID
TF_VAR_DISCORD_TOKEN
// TODO (via GitHub Actions)
- on commit, plan