suzumearch 0.2.13 → 0.2.15

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.
Files changed (3) hide show
  1. package/README.md +38 -4
  2. package/cli.mjs +1829 -1819
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -107,21 +107,55 @@ Configure the bot:
107
107
 
108
108
  ```bash
109
109
  export DISCORD_BOT_TOKEN="..."
110
- export DISCORD_CHANNEL_ID="..."
110
+ export DISCORD_CHANNEL_IDS="123456789012345678,234567890123456789"
111
+ # Optional allowlists:
112
+ export DISCORD_GUILD_IDS="345678901234567890"
113
+ export DISCORD_USER_IDS="456789012345678901,567890123456789012"
114
+ # Owner IDs allowed to perform Discord write/delete/moderation actions:
115
+ export DISCORD_OWNER_IDS="678901234567890123"
111
116
  ```
112
117
 
113
118
  ```powershell
114
119
  $env:DISCORD_BOT_TOKEN="..."
115
- $env:DISCORD_CHANNEL_ID="..."
120
+ $env:DISCORD_CHANNEL_IDS="123456789012345678,234567890123456789"
121
+ # Optional allowlists:
122
+ $env:DISCORD_GUILD_IDS="345678901234567890"
123
+ $env:DISCORD_USER_IDS="456789012345678901,567890123456789012"
124
+ # Owner IDs allowed to perform Discord write/delete/moderation actions:
125
+ $env:DISCORD_OWNER_IDS="678901234567890123"
116
126
  ```
117
127
 
118
128
  Then run `/discord on` inside SuzumeArch. `/discord` opens the configuration
119
129
  menu; `/discord status` prints the active settings.
120
130
 
131
+ You can also configure lists from inside the CLI:
132
+
133
+ ```bash
134
+ /discord channel 123 234
135
+ /discord channel add 345
136
+ /discord guild 456 567
137
+ /discord user 678 789
138
+ /discord owner 890
139
+ ```
140
+
141
+ Single-value env vars and commands still work: `DISCORD_CHANNEL_ID`,
142
+ `DISCORD_GUILD_ID`, `DISCORD_USER_ID`, `DISCORD_OWNER_ID`,
143
+ `/discord channel <id>`, and `/discord guild <id>`.
144
+
145
+ The bot only queues messages when it is mentioned or replied to. Allowed
146
+ non-owner Discord users can ask for read-only Discord information such as roles,
147
+ channels, members, bans, and guild details. Owner IDs configured with
148
+ `DISCORD_OWNER_IDS` or `/discord owner` can also create/update/delete roles and
149
+ channels, kick/ban/unban members, assign roles, move or disconnect members from
150
+ voice, server mute/deafen, set nicknames, time out members, and request the bot
151
+ to join or leave voice channels. The bot needs the corresponding Discord
152
+ application permissions in the server for these actions to succeed.
153
+
121
154
  Warning: Discord mode automatically switches the session to
122
155
  `bypassPermissions` by default. Anyone who can post in the configured Discord
123
- channel can trigger tools and shell commands without per-action prompts. Use a
124
- private channel and a dedicated bot token.
156
+ channels and passes the optional guild/user filters can trigger tools and shell
157
+ commands without per-action prompts. Use private channels, configure owner IDs
158
+ for administration, and use a dedicated bot token.
125
159
 
126
160
  ## Web Search
127
161