Skip to content

Ditto v0.1.0

Choose a tag to compare

@da0t-exe da0t-exe released this 23 Sep 17:32
· 37 commits to main since this release

First release of Ditto: a Discord bot for the voice side of a server and the door in front of it. It puts a picture captcha at the entrance, makes roles read cleanly on a profile, and gives staff a set of voice tools.

Music is on the way. It will run on Lavalink and is not in this release.

Verification

New members see one channel with a Verify button. It opens a private 3×3 grid of photos — "select every image with traffic lights" — and nine buttons laid out like the grid.

  • Photos come from Open Images (CC BY 2.0): traffic lights, bicycles, buses, cars, motorcycles, fire hydrants, stop signs, boats, palm trees, street lights and stairs. Drawings are excluded.
  • A tile is a right answer only when the object fills enough of it. A photo where the object shows up small is never used as a wrong answer either, so no tile is a trick question.
  • No grid is served twice. Each grid's fingerprint is stored, the least shown photos are picked first, and every tile is cropped, flipped and tinted at random.
  • Three wrong answers mean a Discord timeout (10 minutes). Nobody is kicked.
  • Members brought in by a member-pushing bot are recognised from Discord's join source and get a hidden role instead of the captcha.
  • /captcha test runs the real flow without touching your roles, then shows which tiles were expected.

Roles

  • After the captcha, members pick a colour and their games from two menus. /roles brings them back.
  • Tier titles. A role named like ━━ Games ━━ titles every role below it. Ditto gives a member the title only while they hold a role in that tier, so a profile reads as clean floors with no empty headings.

Voice

Requires Move Members.

/move One member, everyone in voice with a role, or a whole channel
/gather Pull everyone in voice into one channel, with a button to send them all back
/split Shuffle a channel into 2–4 teams across empty rooms
/disconnect A member or a whole channel
/shake Bounce a member through random channels, with a Stop button
/lock · /unlock · /locks Lock a channel, optionally for a while (30m, 2h); members who leave are pulled back

Rooms. The first person in an empty room owns it and can rename, cap, lock or hand it over with /room. When it empties, it goes back to its original name, limit and permissions.

Members deafened for 10 minutes are moved to AFK, and joins, leaves and moves go to the log channel. Staff are never pulled back by a lock.

Setup

  • BOT_TOKEN is the only required variable.
  • Slash commands register per server on every start: they appear instantly, with no separate deploy step.
  • Roles and channels are found by name; /setup re-detects them.
  • On first start the captcha image pool builds itself in the background: about 40 MB of annotations plus the photos, ~35 MB kept in data/captcha/. Until it is ready, the Verify button tells newcomers that staff will let them in.
git clone https://github.com/da0t-exe/Ditto.git
cd Ditto
npm install
cp .env.example .env
npm start

Needs Node.js 20+, the Server Members intent, and the bot's role at the top of the role list.

Note

Type-checked, and the grid generator was tested locally against a stand-in pool: 50 grids, all unique, every answer consistent with its tiles. This release has not yet run against Discord, and the real Open Images pool has not been built yet — the first start will be the first end-to-end run.