@dressed/react 1.7.3 → 1.7.4-rc.2

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.
@@ -5,7 +5,7 @@ import type { ReactNode } from "react";
5
5
  type ReactivatedInteraction<T> = OverrideMethodParams<T, {
6
6
  [K in "reply" | "editReply" | "update" | "followUp" | "showModal"]: [
7
7
  components: ReactNode,
8
- ...(Parameters<T[K]> extends readonly [infer First, ...infer Rest] ? [Omit<Exclude<First, string>, "content" | "components">, ...Rest] : never)
8
+ ...(Parameters<T[K]> extends readonly [...infer P] ? [data?: Omit<Exclude<P[0], string>, "content" | "components">, $req?: P[1]] : never)
9
9
  ];
10
10
  }>;
11
11
  type OverrideMethodParams<T, Overrides extends Record<string, unknown[]>> = {
@@ -1,13 +1,13 @@
1
- import { type Snowflake } from "discord-api-types/v10";
1
+ import { type APIMessage, type Snowflake } from "discord-api-types/v10";
2
2
  import { createMessage as dressedCreateMessage, editMessage as dressedEditMessage } from "dressed";
3
3
  import type { ReactNode } from "react";
4
4
  /**
5
5
  * Renders the provided children and posts a message to a guild text or DM channel with the `IsComponentsV2` flag.
6
6
  * @example createMessage(channelId, <Button label="Foo" />)
7
7
  */
8
- export declare function createMessage(channelId: Snowflake, components: ReactNode, data?: Exclude<Parameters<typeof dressedCreateMessage>[1], string>): Promise<unknown>;
8
+ export declare function createMessage(channelId: Snowflake, components: ReactNode, data?: Exclude<Parameters<typeof dressedCreateMessage>[1], string>): Promise<APIMessage>;
9
9
  /**
10
10
  * Renders the provided children and edits a previously sent message.
11
11
  * @example editMessage(channelId, messageId, <Button label="Bar" />)
12
12
  */
13
- export declare function editMessage(channelId: Snowflake, messageId: Snowflake, components: ReactNode, data?: Exclude<Parameters<typeof dressedEditMessage>[2], string>): Promise<unknown>;
13
+ export declare function editMessage(channelId: Snowflake, messageId: Snowflake, components: ReactNode, data?: Exclude<Parameters<typeof dressedEditMessage>[2], string>): Promise<APIMessage>;
@@ -1 +1 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;AACL,CAAC;AAED;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,WAAW,CAC/B,SAAoB,EACpB,SAAoB,EACpB,UAAqB,EACrB,OAAkE,EAAE;;IAEpE,IAAI,CAAC,KAAK,GAAG,CAAC,MAAA,IAAI,CAAC,KAAK,mCAAI,CAAC,CAAC,GAAG,YAAY,CAAC,cAAc,CAAC;IAE7D,OAAO,IAAI,OAAO,CAAa,CAAC,OAAO,EAAE,EAAE;QACzC,MAAM,CAAC,UAAU,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE;YAC7B,IAAI,CAAC,UAAU,GAAG,CAAkC,CAAC;YACrD,OAAO,CAAC,kBAAkB,CAAC,SAAS,EAAE,SAAS,EAAE,IAAI,CAAC,CAAC,CAAC;QAC1D,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dressed/react",
3
- "version": "1.7.3",
3
+ "version": "1.7.4-rc.2",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/Inbestigator/dressed.git",