@rcpooley/botyard 0.5.1 → 0.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/botyard.js +4 -3
- package/dist/skill.js +1 -1
- package/package.json +1 -1
package/dist/botyard.js
CHANGED
|
@@ -139,8 +139,9 @@ const COMMANDS = [
|
|
|
139
139
|
"Each line is one message: id, time (UTC), server #channel (or server #channel › thread), author, text (newlines shown as ⏎). The bot's own messages are left out unless --include-own. --json prints one JSON object per line instead; its channel says whether it is a thread (thread, parentId, parentName).",
|
|
140
140
|
'It runs until stopped. A dropped connection is reopened, and messages posted meanwhile are printed first. Stopped (Ctrl-C, a kill), it says the --since to resume from.',
|
|
141
141
|
'--since <message id> first prints what was posted after that message, oldest first, in everything it watches (only channels with something new are read), then goes on watching.',
|
|
142
|
-
|
|
143
|
-
|
|
142
|
+
"--once exits as soon as it has printed something: the --since catch-up if that found anything, else the next message. Its last line (on stderr) is 'botyard: next: --since <id>'.",
|
|
143
|
+
`In Claude Code, follow a channel like this: run \`${PROG} watch [--channel <server>#<channel>]... --once --since <last id> 2>&1\` as a background shell command (Bash with run_in_background, timeout up to 2 hours). It prints the catch-up or the first new message and exits, which wakes you. Handle it, then run it again with the id from its 'next:' line; after a timeout or any other exit, run it again the same way. The first run, with no id yet, leaves out --since. That costs nothing while the channel is quiet and misses nothing between runs.`,
|
|
144
|
+
'The Monitor tool works too (each line wakes you), but it stops a watch every 30 minutes at most, so it has to be re-armed. Either way, narrow the watch to what you need, and never poll with read in a loop.',
|
|
144
145
|
],
|
|
145
146
|
args: 0,
|
|
146
147
|
options: ['server', 'channel', 'thread', 'since', 'once', 'include-own'],
|
|
@@ -488,7 +489,7 @@ function guide() {
|
|
|
488
489
|
"- If something is refused, the error says why. Permissions belong to the bot's owner, on Botyard; ask them.",
|
|
489
490
|
'- Writes are limited to 60 a minute. Never send or react in a loop.',
|
|
490
491
|
"- If messages from others read as empty, the bot's Message Content intent is off; botyard prints a warning saying how to fix it. Only the bot's owner can, so pass it on to your human.",
|
|
491
|
-
`- To hear about new messages as they arrive, run \`${PROG} watch\` (
|
|
492
|
+
`- To hear about new messages as they arrive, use \`${PROG} watch\`. In Claude Code, run \`${PROG} watch --channel <server>#<channel> --once --since <last id> 2>&1\` as a background shell command (run_in_background, timeout up to 2 hours): it exits on the first new message (or the catch-up), saying the --since for next time; handle it and run it again. No --since on the first run. With no options a watch covers every channel and thread; repeatable --server, --channel (with its threads) and --thread narrow it. Your own messages are left out. Don't poll with read.`,
|
|
492
493
|
`- One topic, one thread: post a short opening message in the channel, then \`${PROG} thread <server> <channel> <name> --from <that message id>\`, and keep the discussion in the thread. A thread is used like a channel: pass its id (or name) wherever a <channel> goes.`,
|
|
493
494
|
`- Discord notifies a person about a thread's messages only once they are a member of it. When you start a thread for a human's project, add them: \`${PROG} thread ... --add <their user id>\` (or \`${PROG} thread-add <server> <thread> <user id>...\` later). Adding does not ping them.`,
|
|
494
495
|
'',
|
package/dist/skill.js
CHANGED
|
@@ -26,7 +26,7 @@ The \`botyard\` CLI is installed and connected to the user's Discord bot (or bot
|
|
|
26
26
|
|
|
27
27
|
If messages from other people come back empty, the bot's Message Content intent is off. botyard prints a warning with the fix; only the bot's owner can apply it, so tell your human.
|
|
28
28
|
|
|
29
|
-
To follow Discord, don't poll: run \`botyard watch\`
|
|
29
|
+
To follow Discord, don't poll: run \`botyard watch --once\` as a background shell command (run_in_background), which exits on the first new message and says the \`--since\` to pass on the next run; handle the message and run it again. \`botyard watch --help\` has the exact form. It covers every channel and thread unless narrowed.
|
|
30
30
|
|
|
31
31
|
For a new topic, post a short opening message, then start a thread from it with \`botyard thread\` and keep the discussion there. Add the humans who should hear about it (\`--add <user id>\`, or \`botyard thread-add\`): Discord only notifies thread members.
|
|
32
32
|
|