Skip to content

MessageSearchOptions

typedef · SourceType: object

Properties

authors

optional

authors: Array<UserResolvable>

An array of author to filter by

mentions

optional

mentions: Array<UserResolvable>

An array of user (mentioned) to filter by

content

optional

content: string

A messageContent to filter by

maxId

optional

maxId: Snowflake

The maximum Message ID to filter by

minId

optional

minId: Snowflake

The minimum Message ID to filter by

channels

optional

channels: Array<TextChannelResolvable>

An array of channel to filter by

pinned

optional

pinned: boolean

Whether to filter by pinned messages

has

optional

has: Array<string>

Message has: link, embed, file, video, image, or sound

nsfw

optional

nsfw: boolean

Whether to filter by NSFW channels

Default: false

offset

optional

offset: number

The number of messages to skip (for pagination, 25 results per page)

Default: 0

limit

optional

limit: number

The number of messages to fetch The maximum limit allowed is 25.

Default: 25

sortBy

optional

sortBy: string

The order to sort by (timestamp or relevance)

sortOrder

optional

sortOrder: string

The order to return results in (asc or desc) The default sort is <code>timestamp</code> in descending order <code>desc</code> (newest first).

Unofficial software. Not affiliated with or supported by Discord.