1.7 KiB
1.7 KiB
S004 — /caption checks
Run in Discord (owner) unless noted. Bot must have the S004 build.
Doubts
- Video path never run: needs ffmpeg with libx264 on the server; check
ffmpeg -encoders | grep libx264there. - Band height unit test depends on the font in
assets/(missing in worktrees). - Slash option names with hyphens (
source-attachment) never registered with Discord yet.
Checks
/imageandD!fxno longer exist (slash list,D!help)./caption text:hellowith a PNG attached: PNG back, white band with centred black text above, same width.- Same with a JPG and a still WebP: works.
- GIF attached: GIF back, still animated, every frame has the band.
- Animated WebP: comes back as an animated GIF.
- MP4, WebM and MOV: MP4 back that plays in Discord, band on top, no sound, at most about 10 s.
/caption source-link:<public image link> text:hi: works.D!caption hireplying to a picture: works.D!caption hi <link>: works./caption text:hiwith no source after someone posted a picture: uses that picture.- Empty text (
D!captionalone,/caption text:blank): clear error card, no upload. - Text of 600 characters: "too long" error. Text of about 200 characters: band grows, still readable.
- Multi-line text: band is as tall as the lines need (3 lines taller than 1).
- Huge input (over 15 MB): "couldn't download" card, no hang.
- Bad link (
http://127.0.0.1/x,not a link): error card, no crash. - Non-media file (a PDF or audio only): "none of those" error.
- Result over the upload budget: smaller retry, else "too big" card.
cargo test band_height caption_keepspasses where assets exist; help-limits test passes.