Moderation
getMessages
$getMessages
Lists the latest messages of a channel and returns one value per message (its ID by default). Bot Creator function, not in the official BDFD wiki.
Syntax
$getMessages[channelID;(limit);(separator);(property);(beforeID);(afterID)]
Parameters
| Parameter | Description |
|---|---|
channelID |
Required. The ID of the channel. |
limit |
Optional. 1 to 100, 10 by default. |
separator |
Optional. Text placed between two values, , by default. |
property |
Optional. id (default), content, authorID, username, timestamp, channelID, url or json. |
beforeID |
Optional. Only messages older than this message ID. |
afterID |
Optional. Only messages newer than this message ID. |
Return Value
- The values joined by the separator, newest first.
Example
$getMessages[$channelID;5;\n;content]
Try it
Paste an example into the playground to preview its message (functions that act on Discord are not run), or build the same thing with blocks.