No description
Find a file
2025-05-12 16:54:25 -07:00
.github Create FUNDING.yml 2025-05-12 16:54:25 -07:00
.gitattributes Initial commit 2025-05-12 15:57:36 -07:00
.gitignore Working code. 2025-05-12 16:13:56 -07:00
bun.lock Working code. 2025-05-12 16:13:56 -07:00
frontierCache.ts Remove Unnesccary Slack requests 2025-05-12 16:53:02 -07:00
index.ts Remove Unnesccary Slack requests 2025-05-12 16:53:02 -07:00
LICENSE Initial commit 2025-05-12 15:57:36 -07:00
package.json Working code. 2025-05-12 16:13:56 -07:00
README.md Working code. 2025-05-12 16:13:56 -07:00
tsconfig.json Working code. 2025-05-12 16:13:56 -07:00
types.ts Working code. 2025-05-12 16:13:56 -07:00
users.toml.example Working code. 2025-05-12 16:13:56 -07:00

slack-simplyplural

Credit for most of the code goes to https://github.com/dainfloop! I modified it to include exclusions and remove pronouns if you have them in the name.

Keep your Slack profile in sync with your current fronters in SimplyPlural. This script updates your Slack display name, pronouns, and profile picture to reflect who's fronting — while letting you exclude certain groups and optionally use replacement members instead.

What it does

  • Fetches your current fronters from SimplyPlural
  • Lets you exclude fronters in specific groups (like "Littles", "Bots", etc.)
  • Replaces excluded fronters with a member of your choice or a default fallback
  • Merges avatars into a single profile photo grid
  • Updates your Slack display name and pronouns accordingly

Setup

Youll need:

  • A Slack user token (not a bot token) with users.profile:write and users.setPhoto scopes
  • Your SimplyPlural system ID and API token
  • Node.js or Bun (recommended if youre on Windows)
  • Some way to run TypeScript (ts-node, bun, or compile with tsc)

1. Install dependencies

If youre using Bun (recommended on Windows):

bun install

If you're using npm:

npm install

If canvas fails to build on npm, use Bun or prebuilt binaries.

2. Configure users.toml

Rename users.toml.example to users.toml, make a slack app, go to OAUTH, make sure it has profile write in the USER scopes, then install to your space. Go to SimplyPlural, settings, account, tokens, select read and then copy it to the users.toml file

Notes:

  • Excluded group names are case-insensitive
  • Replacements are optional — fallback is used if none is defined
  • Replacement members do not need to be fronting

3. Run it

If youre using Bun:

bun index.ts

With ts-node:

npx ts-node index.ts

Or compile TypeScript first:

npx tsc && node index.js

What shows up in Slack

  • Your profile photo becomes a 1×N or 2×2 grid of fronting members (excluding any filtered out)
  • Your display name includes all current names (pronouns removed from {brackets})
  • Your pronouns field lists all unique pronoun sets and which members use them

Troubleshooting

  • If SimplyPlural returns 401 or 403, make sure your token is correct
  • Slack tokens must be user tokens — bot tokens wont work for profile updates
  • If canvas wont build on npm, try Bun or install native dependencies for node-canvas
  • Make sure that all profile pictures are the same size!