- Doc site UI improvements and fixes - Added Discord widget - Fixed some styling issues - Added command docs briefs and details - Briefs are shown in the right-hand panel - Details can be shown by clicking `Open full details` - Added ShaiWatchers' logo as the site favicon - Moved HTML template to static file for responsiveness improvements
62 lines
2.3 KiB
HTML
62 lines
2.3 KiB
HTML
<h2 style="margin:0 0 .5rem 0">What it does</h2>
|
||
<ul>
|
||
<li>Checks you’re a moderator, validates your reason, and posts a restart entry to the modlog (who, when, version, reason).</li>
|
||
<li>Closes the bot cleanly and exits; your process manager/container brings it back up.</li>
|
||
</ul>
|
||
|
||
<hr>
|
||
|
||
<h2 style="margin:.75rem 0 .5rem">Reason requirements</h2>
|
||
<p>The <code>reason</code> must be specific enough to audit later:</p>
|
||
<ul>
|
||
<li>At least <b>20 characters</b></li>
|
||
<li>At least <b>4 words</b></li>
|
||
<li>At least <b>3 words</b> with length ≥ 3</li>
|
||
<li>Rejects vague phrases like: <code>stuck</code>, <code>idk</code>, <code>don't know</code>, <code>unknown</code>, <code>?</code>,
|
||
<code>lag</code>, <code>restart</code>, <code>restarting</code>, <code>update</code>, <code>updating</code>,
|
||
<code>bug</code>, <code>crash</code>, <code>crashed</code></li>
|
||
</ul>
|
||
|
||
<h3 style="margin:.75rem 0 .4rem">Examples</h3>
|
||
<div style="display:grid; gap:.5rem">
|
||
<div>
|
||
<div style="font-weight:600">✅ Good</div>
|
||
<pre style="margin:.25rem 0;white-space:pre-wrap">/power restart reason:"Reloading cogs after changing threat weights and enabling nick loop; avoids inconsistent state."</pre>
|
||
</div>
|
||
<div>
|
||
<div style="font-weight:600">❌ Bad</div>
|
||
<pre style="margin:.25rem 0;white-space:pre-wrap">/power restart reason:"update"</pre>
|
||
</div>
|
||
</div>
|
||
|
||
<hr>
|
||
|
||
<h2 style="margin:.75rem 0 .5rem">What you’ll see</h2>
|
||
<ul>
|
||
<li>Ephemeral confirmation in chat.</li>
|
||
<li>Modlog post similar to:
|
||
<pre style="margin:.4rem 0;white-space:pre-wrap">🔁 Bot Restart Requested
|
||
By: @YourName
|
||
When: 2025-01-01 12:34 UTC
|
||
Running version: vX.Y.Z
|
||
Reason: Reloading cogs after threat weight change…</pre>
|
||
</li>
|
||
<li>Bot goes offline briefly, then comes back once the host restarts it.</li>
|
||
</ul>
|
||
|
||
<hr>
|
||
|
||
<h2 style="margin:.75rem 0 .5rem">Config that affects it</h2>
|
||
<ul>
|
||
<li><code>modlog_channel_id</code> — where the restart entry is posted. If not set, it falls back to server logs only.</li>
|
||
<li><code>home_guild_id</code> — where the <code>/power</code> group is registered (home-guild only vs global).</li>
|
||
</ul>
|
||
|
||
<hr>
|
||
|
||
<h2 style="margin:.75rem 0 .5rem">Permissions</h2>
|
||
<ul>
|
||
<li><b>Moderator-only.</b> Non-mods are blocked with an ephemeral message.</li>
|
||
<li>Bot just needs permission to send messages in the modlog channel.</li>
|
||
</ul>
|