shaiwatcher/assets/docs/commands/PirateCardsCog.pirate_cards_rebuild.details.html
Franz Rolfsvaag fdd336fe91 0.4.1.0.a1
- 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
2025-08-15 06:17:52 +02:00

45 lines
1.7 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<h1>/pirate_cards_rebuild — Rebuild all pirate cards</h1>
<p>Runs a full pass that makes sure each verified pirate has a fresh, accurate card in the configured channel.</p>
<h2>Access</h2>
<ul>
<li><strong>Moderator-only</strong>.</li>
<li>Must be used in a server channel (not DMs). The confirmation is sent <em>ephemerally</em>.</li>
</ul>
<h2>What it updates</h2>
<ul>
<li><strong>Card fields</strong>: Account name, Threat %, “In groups” bucket, “Destructive” bucket, total encounters, and last encounter date (UTC).</li>
<li><strong>Colors</strong>: Unknown samples → dark gray. Otherwise a green→red gradient based on Threat %.</li>
<li><strong>Safety</strong>: User-provided names are escaped and mentions are neutralized (no pings).</li>
</ul>
<h2>Behavior</h2>
<ol>
<li>For each pirate in the internal list:
<ul>
<li>If their card already exists, it edits the embed in place.</li>
<li>If it cant find the message, it posts a new card and records the message ID.</li>
</ul>
</li>
<li>Works serially per guild to avoid race conditions.</li>
</ol>
<h2>Output</h2>
<p>Ephemeral summary, e.g.:</p>
<pre>Rebuilt/updated 27 pirate cards.</pre>
<h2>Setup notes</h2>
<ul>
<li>Uses <code>pirates_list_channel_id</code> for the destination channel.</li>
<li>Threat %, group/destructive buckets, and last seen are computed from stored encounters.</li>
<li>Bucket thresholds respect your server settings (e.g., <code>threat_group_threshold</code>, <code>threat_min_samples_for_stats</code>).</li>
</ul>
<h2>When to run it</h2>
<ul>
<li>After importing or migrating data.</li>
<li>After a batch of new pirates is approved.</li>
<li>Any time the cards look out of date.</li>
</ul>