@dressed/react 1.3.0 → 1.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8,7 +8,7 @@ import type { ReactNode } from "react";
8
8
  * @param components The contents of the message
9
9
  * @param data The message data
10
10
  */
11
- export declare function createMessage(channel: Snowflake, components: ReactNode, data: Omit<RESTPostAPIChannelMessageJSONBody, "content"> & {
11
+ export declare function createMessage(channel: Snowflake, components: ReactNode, data?: Omit<RESTPostAPIChannelMessageJSONBody, "content"> & {
12
12
  files?: RawFile[];
13
13
  }): Promise<import("discord-api-types/v10").APIMessage>;
14
14
  /**
@@ -18,6 +18,6 @@ export declare function createMessage(channel: Snowflake, components: ReactNode,
18
18
  * @param components The contents of the message
19
19
  * @param data The new message data
20
20
  */
21
- export declare function editMessage(channel: Snowflake, message: Snowflake, components: ReactNode, data: Omit<RESTPatchAPIChannelMessageJSONBody, "content"> & {
21
+ export declare function editMessage(channel: Snowflake, message: Snowflake, components: ReactNode, data?: Omit<RESTPatchAPIChannelMessageJSONBody, "content"> & {
22
22
  files?: RawFile[];
23
23
  }): Promise<import("discord-api-types/v10").APIMessage>;
@@ -8,7 +8,7 @@ import { render } from "./index.js";
8
8
  * @param components The contents of the message
9
9
  * @param data The message data
10
10
  */
11
- export async function createMessage(channel, components, data) {
11
+ export async function createMessage(channel, components, data = {}) {
12
12
  var _a;
13
13
  const flags = ((_a = data.flags) !== null && _a !== void 0 ? _a : 0) | MessageFlags.IsComponentsV2;
14
14
  data.flags = flags;
@@ -22,7 +22,7 @@ export async function createMessage(channel, components, data) {
22
22
  * @param components The contents of the message
23
23
  * @param data The new message data
24
24
  */
25
- export async function editMessage(channel, message, components, data) {
25
+ export async function editMessage(channel, message, components, data = {}) {
26
26
  var _a;
27
27
  const flags = ((_a = data.flags) !== null && _a !== void 0 ? _a : 0) | MessageFlags.IsComponentsV2;
28
28
  data.flags = flags;
@@ -1 +1 @@
1
- {"version":3,"file":"message.js","sourceRoot":"","sources":["../../src/rendering/message.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,IAAI,oBAAoB,EACrC,WAAW,IAAI,kBAAkB,GAClC,MAAM,SAAS,CAAC;AAEjB,OAAO,EACL,YAAY,GAIb,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAEpC;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa,CACjC,OAAkB,EAClB,UAAqB,EACrB,IAEC;;IAED,MAAM,KAAK,GAAG,CAAC,MAAA,IAAI,CAAC,KAAK,mCAAI,CAAC,CAAC,GAAG,YAAY,CAAC,cAAc,CAAC;IAC9D,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACnB,IAAI,CAAC,UAAU,GAAG,CAAC,MAAM,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,UAAmB,CAAC;IACjE,OAAO,oBAAoB,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;AAC7C,CAAC;AAED;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,WAAW,CAC/B,OAAkB,EAClB,OAAkB,EAClB,UAAqB,EACrB,IAEC;;IAED,MAAM,KAAK,GAAG,CAAC,MAAA,IAAI,CAAC,KAAK,mCAAI,CAAC,CAAC,GAAG,YAAY,CAAC,cAAc,CAAC;IAC9D,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACnB,IAAI,CAAC,UAAU,GAAG,CAAC,MAAM,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,UAAmB,CAAC;IACjE,OAAO,kBAAkB,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC;AACpD,CAAC"}
1
+ {"version":3,"file":"message.js","sourceRoot":"","sources":["../../src/rendering/message.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,IAAI,oBAAoB,EACrC,WAAW,IAAI,kBAAkB,GAClC,MAAM,SAAS,CAAC;AAEjB,OAAO,EACL,YAAY,GAIb,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAEpC;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa,CACjC,OAAkB,EAClB,UAAqB,EACrB,OAEI,EAAE;;IAEN,MAAM,KAAK,GAAG,CAAC,MAAA,IAAI,CAAC,KAAK,mCAAI,CAAC,CAAC,GAAG,YAAY,CAAC,cAAc,CAAC;IAC9D,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACnB,IAAI,CAAC,UAAU,GAAG,CAAC,MAAM,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,UAAmB,CAAC;IACjE,OAAO,oBAAoB,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;AAC7C,CAAC;AAED;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,WAAW,CAC/B,OAAkB,EAClB,OAAkB,EAClB,UAAqB,EACrB,OAEI,EAAE;;IAEN,MAAM,KAAK,GAAG,CAAC,MAAA,IAAI,CAAC,KAAK,mCAAI,CAAC,CAAC,GAAG,YAAY,CAAC,cAAc,CAAC;IAC9D,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACnB,IAAI,CAAC,UAAU,GAAG,CAAC,MAAM,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,UAAmB,CAAC;IACjE,OAAO,kBAAkB,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC;AACpD,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dressed/react",
3
- "version": "1.3.0",
3
+ "version": "1.3.1",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/Inbestigator/dressed.git",