Appearance
MessageManager
Package: @erinjs/core
Manages messages for a channel. Access via channel.messages.
Constructor
| Name | Type | Optional | Description |
|---|---|---|---|
client | Client | No | |
channelId | string | No |
Properties
None
Methods
fetch() async
Fetch a message by ID from this channel. When message caching is enabled, the fetched message is added to the cache.
Returns: Promise<Message>
Parameters:
| Name | Type | Optional | Description |
|---|---|---|---|
messageId | string | No | Snowflake of the message |
get()
Get a message from cache. Returns undefined if not cached or caching is disabled. Requires options.cache.messages > 0.
Returns: Message | undefined
Parameters:
| Name | Type | Optional | Description |
|---|---|---|---|
messageId | string | No | Snowflake of the message |