• 🏠
  • AI helpers
  • What an AI helper can do
View as Markdown

What an AI helper can do

These are the tools a connected helper gets. Each goes through the same checks as the editors in the app.

Looking

ToolWhat it answers
get_communityThe community: name, size, what its design may use, its channels, what its store has. Start here.
reference(topic, find)The rules for a part: design, channels, widgets, scripts, store, page, manual. With find, only the lines with those words.
get_design(parts)The saved design (pictures and fonts by hash) and what it may use; only the parts asked for.
get_storeThe shelves with their games, labels and scores (what GC.store() gives the page).
search_games(query, take)Games Communities' games by words of their title or ident (1-50).
list_uploadsThe community's uploaded pictures and fonts, newest first.

The look

ToolWhat it does
set_design(patch)Changes parts of the design, each part replacing the old one whole. channelsCssAppend adds CSS after the saved channels' CSS. Answers with what the cleaner left out.
edit_text(target, old, new, all)Changes part of a long text (channelsCss or script:<name>) without sending it all again.
upload_link(page)A one-time address (15 minutes, one file) to PUT a file with curl -T: a picture (4 MB), font (1 MB), track (8 MB) or animation. With page, a file of the page (or "/" for a zip of its folder).
upload_file(base64)A small file as base64. Prefer upload_link.

The page

ToolWhat it does
list_files(folder)The draft's files, whether the draft differs from what shows, the live version, the last versions, the limits.
get_file(path, version, from, count)A text file of the draft or of a published version, in parts if long.
write_file(path, text)Writes a whole text file (html, css, js, json, txt, svg) into the draft.
edit_file(path, old, new, all)Changes part of a file of the draft.
delete_file(path)Takes a file out of the draft.
publish_pageShows the draft to everyone as a new version (it needs index.html).

The store

ToolWhat it does
save_shelf(id, name, about, style, games)Adds a shelf (no id) or changes one. Styles: cards, row, tiles, big, list.
delete_shelf(id)Deletes a shelf.
mark_game(game, labels, score)Puts up to 4 of the design's labels and a 1-5 score (0: none) on a game.
save_channel(id, name, kind, topic, widget, parent)Makes a channel (no id) or changes one. Kinds: text, announcements, forum, voice, category, widget (one of get_community's activities fills it).

Group settings

ToolWhat it does
group_settings(method, path, body, base64)Reads (GET) or changes anything of the group its officer may, as them: its name and words, Sourcing (pitches, saved and passed games, picks, the brief, deals asked, outside games, members' suggestions), Sales, Events, Activities, Shelves, moderation (filters, bans, time outs), members, roles, invites, chat, emoji, stickers and sounds. Only what the officer's rank and roles let them; never deleting the group. reference("settings") lists every path.

Scripts and data

ToolWhat it does
list_scriptsThe scripts: names, what each listens for, on or off, failures in a row.
get_script(script, runs, code)A script's code and its last runs (0-50).
try_script(...)Runs code on a made-up event (join, leave, message, command, buy, widget, every:<minutes>, at:<HH:MM>) without doing anything: what it would post, set and change, its log and error. Keeps a room between tries: send its id back.
save_script(name, code, enabled)Saves a script by name. Without code, saves the code last tried (kept 30 minutes).
switch_script(script, on)Switches a script on or off (one failing 20 times in a row is switched off by itself).
delete_script(script)Deletes a script and its runs.
get_data(prefix, key)The community's data by prefix (up to 100 keys; long values as sizes), or one key whole.
set_data(key, value)Sets a key to a JSON value (up to 16 KB), or deletes it (null).

Good habits

For AI helpers

  • Start with get_community, then reference(topic) for what you'll change, and reference("manual", "<words>") for how members will see it.
  • Try every script with try_script before save_script.
  • Upload files with upload_link and curl -T, not base64.
  • Change long CSS, HTML and code with edit_text or edit_file, never by sending it all again.
  • Ask get_design(parts) for only the parts you need.
  • Games Communities draws prices and buy buttons itself: a page opens a game with GC.open(ident).
  • The community's code can't reach logins, other sites, or Games Communities' own header and columns.
  • Never write words asking for passwords, codes or cards, or speaking as Games Communities: they are refused.