diff --git a/docs/plugins/modules/common/stores/messages.mdx b/docs/plugins/modules/common/stores/messages.mdx index 3e494dd..cd60230 100644 --- a/docs/plugins/modules/common/stores/messages.mdx +++ b/docs/plugins/modules/common/stores/messages.mdx @@ -8,13 +8,16 @@ import RequiredNotice from "@site/src/components/RequiredNotice.mdx"; - + ### Functions | Name | Parameters | Return Type | Description | | ------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | | `clearChannel` | `channelId`: string | void | Clears all messages in a channel. This will only apply locally and the messages will be re-fetched. | +| `createBotMessage` | `options`: [`CreateBotMessageOptions`](#CreateBotMessageOptions) | | Creates a bot message without sending it | +| `createMessage` | `options`: [`CreateMessageOptions`](#CreateMessageOptions) | | Creates a message without sending it | +| `createNonce` | | string | Generate a new snowflake id | | `crosspostMessage` | `channelId`: string
`messageId`: string | Promise<[`HTTPResponse`](../utilities/api#HTTPResponse) \| void> | Makes a message public in an announcement channel | | `deleteMessage` | `channelId`: string
`messageId`: string
`keepThreadArchived`: boolean | Promise | Deletes a message from a channel | | `dismissAutomatedMessage` | `message`: | void | Dismisses an ephemeral message | @@ -44,6 +47,7 @@ import RequiredNotice from "@site/src/components/RequiredNotice.mdx"; | `trackJump` | `channelId`: string
`messageId`: string
`context`: string
`extraProperties`: Record | void | Tracks a jump for analytics | | `truncateMessages` | `channelId`: string
`truncateBottom`: boolean
`truncateTop`: boolean | void | Truncates a message list | | `updateEditMessage` | `channelId`: string
`textValue`: string
`richValue`: unknown | void | Updates an edit message | +| `userRecordToServer` | `user`: | `UserServer` | Converts an user record into a simplified version for the server | ### Types {#messages-types} @@ -54,6 +58,29 @@ import RequiredNotice from "@site/src/components/RequiredNotice.mdx"; | `parse` | string[] | Array of allowed mention types to parse from the content | | `replied_user` | boolean | Whether to mention the author of the message being replied to | +#### `CreateBotMessageOptions` {#CreateBotMessageOptions} + +| Name | Type | Default | Description | +| ------------- | ------------------------- | ------- | ---------------------------------------------- | +| `channelId` | string | | Id of the channel where the message belongs to | +| `content` | string | | Content of the message | +| `embeds` | [] | | Array of embedded content | +| `loggingName` | string | | Message name for analytics | + +#### `CreateMessageOptions` {#CreateMessageOptions} + +| Name | Type | Default | Description | +| ------------------ | --------------------------------------- | ------- | ---------------------------------------------- | +| `allowedMentions` | [`AllowedMentions`](#AllowedMentions) | | Allowed mentions for the message | +| `author` | | | Author of the message | +| `channelId` | string | | Id of the channel where the message belongs to | +| `content` | string | | Content of the message | +| `flags` | number | | Message flags | +| `messageReference` | [`MessageReference`](#MessageReference) | | Contains information for a reply | +| `nonce` | string | | Id of the message | +| `tts` | boolean | `false` | Whether the message is a TTS message | +| `type` | number | `0` | Type of message | + #### `FocusMessageOptions` {#FocusMessageOptions} | Name | Type | Default | Description | diff --git a/docs/plugins/modules/common/utilities/constants.md b/docs/plugins/modules/common/utilities/constants.md index 21a9589..510e199 100644 --- a/docs/plugins/modules/common/utilities/constants.md +++ b/docs/plugins/modules/common/utilities/constants.md @@ -11,6 +11,7 @@ description: All constants used in the client | `CSSVariables` | Record | CSS variables | | `Endpoints` | Record | Endpoints | | `GuildFeatures` | Record | Guild features | +| `MessageFlags` | Record | Message flags | | `Paths` | Record | Web routes | | `Permissions` | Record | Permissions | | `raw` | Record | Raw module with all constants; check out its contents with Discord DevTools |