Search messages
search_messagesSearch recent messages in a Discord channel by content and author. Scans history up to a configurable limit for case-insensitive substring matches.
Instructions
Search recent messages in one channel by content and author. The bot API has no native search, so this scans history newest to oldest up to scan_limit messages and reports exactly how far it looked. Results are case-insensitive substring matches.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| guild | No | Guild (server) name or ID. Omit to use the default guild. | |
| limit | No | Max results. Default 10. | |
| query | Yes | Text to look for. | |
| author | No | Only messages whose author name matches this. | |
| channel | Yes | Channel name or ID to search in. | |
| scan_limit | No | How many messages to scan before stopping. Default 300. |