# $searchMessages

Searches the messages of the server for a text and returns one value per message found. Bot Creator function, not in the official BDFD wiki.

## Syntax

```
$searchMessages[guildID;query;(limit);(separator);(property);(channelID);(authorID)]
```

## Parameters

| Parameter | Description |
|---|---|
| `guildID` | **Required.** The ID of the server. Empty or absent: the current server. |
| `query` | **Required.** The text to search. |
| `limit` | Optional. 1 to 25, 10 by default. |
| `separator` | Optional. Text placed between two values, `, ` by default. |
| `property` | Optional. Same as `$getMessages`, plus `total` (the number of results). |
| `channelID` | Optional. Only this channel. |
| `authorID` | Optional. Only this author. |

## Return Value

- The values joined by the separator, or the number of results with the property `total`.

## Example

```bdfd
$searchMessages[$guildID;invoice;5;\n;url]
```
