GuildMessageSearchOptions

interface GuildMessageSearchOptions

Filters for guild.searchMessages(). Every filter you set must match. Array filters match any of their values.

Properties

Property

Type

Description

attachmentExtensions?

string[]

attachmentFilenames?

string[]

authorIds?

string[]

authorTypes?

"user" | "bot" | "webhook" | "-user" | "-bot" | "-webhook"[]

channelIds?

string[]

content?

string

embedProviders?

string[]

embedTypes?

"gif" | "image" | "sound" | "video" | "article"[]

has?

GuildMessageSearchHas[]

includeNsfw?

boolean

limit?

number

Results per page, from 1 to 25.

linkHostnames?

string[]

maxId?

string

Only messages older than this message ID.

mentionEveryone?

boolean

mentionRoleIds?

string[]

mentions?

string[]

minId?

string

Only messages newer than this message ID.

offset?

number

Number of results to skip, for paging.

pinned?

boolean

repliedToMessageIds?

string[]

repliedToUserIds?

string[]

slop?

number

How many words may appear between the words of content . Discord defaults to 2.

sortBy?

"timestamp" | "relevance"

sortOrder?

"asc" | "desc"