.fetch()
→ Promise<Message>
Fetch the full message from the API.
const message = await partial.fetch();
await message.reply('Pong!');Class
Uncached or incomplete message (MessageDelete, uncached MessageUpdate, MessageDeleteBulk entries). Not a Message: no edit() / reply(). Call fetch to hydrate, or narrow with message.partial.
new PartialMessage(client: Client, data: { id: string; channelId: string; guildId?: string | null; channel?: TextBasedChannel | null; content?: string | null; authorId?: string | null; author?: User | null; createdAt?: Date | null; })Client{ … }| Name | Type | Description |
|---|---|---|
| authorread-only | User | null | |
| authorIdread-only | string | null | |
| channelread-only | TextBasedChannel | null | Live text-capable channel from cache, or null if uncached / not text-based. Same contract as message.channel. |
| channelIdread-only | string | |
| clientread-only | Client | |
| contentread-only | string | null | |
| createdAtread-only | Date | null | |
| guildIdread-only | string | null | |
| idread-only | string | |
| partialread-only | true |
→ Promise<Message>
Fetch the full message from the API.
const message = await partial.fetch();
await message.reply('Pong!');→ Promise<Channel>
Fetch this message's channel (cache first). The returned Channel has channel.delete and channel.send.
const channel = await message.resolveChannel();
await channel.delete();