messages
Lists exact message slices by channel, author, and time range. Unlike search, this does not query the FTS index - it pulls a slice of rows.
#Usage
discrawl messages --channel maintainers --days 7 --all
discrawl messages --channel maintainers --hours 6 --all
discrawl messages --channel "#maintainers" --since 2026-03-01T00:00:00Z
discrawl messages --channel 1456744319972282449 --author steipete --limit 50
discrawl messages --channel maintainers --last 100 --sync
discrawl messages --dm --channel Molty --last 20
discrawl messages --channel maintainers --days 7 --all --include-empty
discrawl --json messages --channel maintainers --days 3
#Flags
--channel <id|name|#name>- resolve one exact id, exact name, or unique partial name--guild <id>/--guilds <id,id>/--dm- restrict the guild scope (--dmis shorthand for--guild @me)--author <name>- restrict to one author--hours <n>- shorthand for "since now minus N hours"--days <n>- shorthand for "since now minus N days"--since <RFC3339>- explicit start timestamp--last <n>- return the newestNmatching messages, then print oldest-to-newest--limit <n>- safety limit (default 200;--allremoves it)--all- removes the safety limit--sync- blocking pre-query sync for the matching channel or guild scope; omit whiletailis already maintaining live freshness--include-empty- include rows with no displayable/searchable content
#Notes
- at least one filter is required
- if
tailis already running, plainmessagesreads the local archive without waiting;messages --syncfails fast instead of waiting behind the tail lock --dmskips Git snapshot auto-update because DMs are never imported from the shared mirror- use either
--lastfor the newest matching rows or--allfor an uncapped oldest-to-newest slice - uncapped and large listings retain mention display names even beyond 32,766 messages; reply and mention lookups do not impose a separate row cap
- ambiguous channel names fail with candidate guild/channel ids; resolve once with
discrawl channels resolve <name> --jsonand reuse the numeric id
#Empty results
A listing that matches nothing can print a note to stderr naming the likely cause and a suggested next step: the channel has no messages in the local mirror (with a follow-up for a forum id, whose posts live in separate thread channels), every message in it is empty or attachment-only and so needs --include-empty, the --hours/--days/--since/--before window sits entirely outside the data, in which case the note reports the newest or oldest timestamp actually in scope, or the channel exists but sits in a guild outside the --guild/--guilds scope, in which case the note names the guild to use instead.
These notes are diagnostics, not output: they go to stderr and never stdout, --json suppresses them, and stdout bytes and the exit code are unchanged either way, so stdout-only pipelines retain their existing output; consumers merging stderr into stdout will see the new notes.
With --author, these notes are suppressed because the scope counts do not reproduce author-name matching. When both time bounds exclude every row, the note recommends removing both. A --channel that resolved to a name fragment rather than a concrete id gets none, because the counts behind one cannot reproduce that row set.