dfx 0.21.4 → 0.21.6

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.
Files changed (111) hide show
  1. package/Cache/driver.d.ts +16 -16
  2. package/Cache/driver.js.map +1 -1
  3. package/Cache/index.d.ts +21 -21
  4. package/Cache/index.js +2 -3
  5. package/Cache/index.js.map +1 -1
  6. package/Cache/memory.d.ts +3 -3
  7. package/Cache/memory.js +19 -18
  8. package/Cache/memory.js.map +1 -1
  9. package/Cache/memoryTTL.d.ts +5 -5
  10. package/Cache/memoryTTL.js +15 -15
  11. package/Cache/memoryTTL.js.map +1 -1
  12. package/Cache/prelude.d.ts +37 -37
  13. package/Cache/prelude.js +5 -6
  14. package/Cache/prelude.js.map +1 -1
  15. package/DiscordConfig/index.d.ts +4 -4
  16. package/DiscordConfig/index.js +8 -5
  17. package/DiscordConfig/index.js.map +1 -1
  18. package/DiscordGateway/DiscordWS/index.d.ts +8 -9
  19. package/DiscordGateway/DiscordWS/index.js +19 -16
  20. package/DiscordGateway/DiscordWS/index.js.map +1 -1
  21. package/DiscordGateway/Shard/heartbeats.d.ts +3 -3
  22. package/DiscordGateway/Shard/heartbeats.js +12 -10
  23. package/DiscordGateway/Shard/heartbeats.js.map +1 -1
  24. package/DiscordGateway/Shard/identify.d.ts +4 -5
  25. package/DiscordGateway/Shard/identify.js +4 -4
  26. package/DiscordGateway/Shard/identify.js.map +1 -1
  27. package/DiscordGateway/Shard/index.d.ts +7 -8
  28. package/DiscordGateway/Shard/index.js +17 -17
  29. package/DiscordGateway/Shard/index.js.map +1 -1
  30. package/DiscordGateway/Shard/invalidSession.d.ts +2 -2
  31. package/DiscordGateway/Shard/invalidSession.js +7 -5
  32. package/DiscordGateway/Shard/invalidSession.js.map +1 -1
  33. package/DiscordGateway/Shard/utils.d.ts +3 -3
  34. package/DiscordGateway/Shard/utils.js +5 -5
  35. package/DiscordGateway/Shard/utils.js.map +1 -1
  36. package/DiscordGateway/ShardStore/index.d.ts +6 -6
  37. package/DiscordGateway/ShardStore/index.js +10 -7
  38. package/DiscordGateway/ShardStore/index.js.map +1 -1
  39. package/DiscordGateway/Sharder/index.d.ts +10 -12
  40. package/DiscordGateway/Sharder/index.js +15 -14
  41. package/DiscordGateway/Sharder/index.js.map +1 -1
  42. package/DiscordGateway/WS/index.d.ts +3 -3
  43. package/DiscordGateway/WS/index.js +12 -11
  44. package/DiscordGateway/WS/index.js.map +1 -1
  45. package/DiscordGateway/index.d.ts +8 -8
  46. package/DiscordGateway/index.js +9 -8
  47. package/DiscordGateway/index.js.map +1 -1
  48. package/DiscordREST/index.d.ts +136 -136
  49. package/DiscordREST/index.js +39 -36
  50. package/DiscordREST/index.js.map +1 -1
  51. package/DiscordREST/types.d.ts +4 -4
  52. package/DiscordREST/utils.d.ts +4 -5
  53. package/DiscordREST/utils.js +5 -5
  54. package/DiscordREST/utils.js.map +1 -1
  55. package/Helpers/intents.js +9 -8
  56. package/Helpers/intents.js.map +1 -1
  57. package/Helpers/interactions.d.ts +18 -18
  58. package/Helpers/interactions.js +23 -22
  59. package/Helpers/interactions.js.map +1 -1
  60. package/Helpers/members.d.ts +3 -3
  61. package/Helpers/members.js.map +1 -1
  62. package/Helpers/permissions.d.ts +4 -5
  63. package/Helpers/permissions.js +14 -13
  64. package/Helpers/permissions.js.map +1 -1
  65. package/Http/index.d.ts +9 -10
  66. package/Http/index.js +8 -7
  67. package/Http/index.js.map +1 -1
  68. package/Interactions/context.d.ts +23 -22
  69. package/Interactions/context.js +25 -22
  70. package/Interactions/context.js.map +1 -1
  71. package/Interactions/definitions.d.ts +29 -30
  72. package/Interactions/definitions.js +2 -1
  73. package/Interactions/definitions.js.map +1 -1
  74. package/Interactions/gateway.d.ts +3 -4
  75. package/Interactions/gateway.js +6 -6
  76. package/Interactions/gateway.js.map +1 -1
  77. package/Interactions/handlers.d.ts +2 -2
  78. package/Interactions/handlers.js +18 -17
  79. package/Interactions/handlers.js.map +1 -1
  80. package/Interactions/index.d.ts +7 -7
  81. package/Interactions/index.js +7 -8
  82. package/Interactions/index.js.map +1 -1
  83. package/Interactions/webhook.d.ts +7 -7
  84. package/Interactions/webhook.js +13 -11
  85. package/Interactions/webhook.js.map +1 -1
  86. package/Log/index.d.ts +8 -8
  87. package/Log/index.js +11 -9
  88. package/Log/index.js.map +1 -1
  89. package/RateLimit/index.d.ts +12 -13
  90. package/RateLimit/index.js +12 -11
  91. package/RateLimit/index.js.map +1 -1
  92. package/RateLimit/memory.js +7 -7
  93. package/RateLimit/memory.js.map +1 -1
  94. package/RateLimit/utils.d.ts +1 -1
  95. package/RateLimit/utils.js.map +1 -1
  96. package/_common.d.ts +22 -18
  97. package/_common.js +0 -18
  98. package/_common.js.map +1 -1
  99. package/gateway.d.ts +6 -7
  100. package/gateway.js +0 -2
  101. package/gateway.js.map +1 -1
  102. package/global.d.ts +21 -0
  103. package/global.js +2 -0
  104. package/global.js.map +1 -0
  105. package/package.json +3 -3
  106. package/utils/effect.d.ts +9 -8
  107. package/utils/effect.js +4 -4
  108. package/utils/effect.js.map +1 -1
  109. package/webhooks.d.ts +4 -5
  110. package/webhooks.js +3 -5
  111. package/webhooks.js.map +1 -1
@@ -1,8 +1,9 @@
1
1
  import * as tsplus_module_1 from "@effect/io/Effect";
2
2
  import * as tsplus_module_2 from "@effect/io/Ref";
3
3
  import * as tsplus_module_3 from "@effect/stream/Stream";
4
- import { Log } from "dfx/Log/index";
5
- import { Effect, pipe, Schedule, Stream } from "dfx/_common";
4
+ import * as tsplus_module_4 from "@effect/io/Schedule";
5
+ import * as tsplus_module_5 from "dfx";
6
+ import * as tsplus_module_6 from "@fp-ts/data/Function";
6
7
  import WebSocket from "isomorphic-ws";
7
8
  export const Reconnect = Symbol();
8
9
  export class WebSocketError {
@@ -23,17 +24,17 @@ export class WebSocketCloseError {
23
24
  }
24
25
  const socket = (urlRef) => tsplus_module_1.acquireRelease(tsplus_module_1.flatMap(url => {
25
26
  const ws = new WebSocket(url);
26
- return tsplus_module_1.map(() => ws)(Effect.async((resume) => {
27
- ws.addEventListener("open", () => resume(Effect.unit()), {
27
+ return tsplus_module_1.map(() => ws)(tsplus_module_1.async((resume) => {
28
+ ws.addEventListener("open", () => resume(tsplus_module_1.unit()), {
28
29
  once: true,
29
30
  });
30
31
  }));
31
- })(tsplus_module_2.get(urlRef)), (ws) => Effect.sync(() => {
32
+ })(tsplus_module_2.get(urlRef)), (ws) => tsplus_module_1.sync(() => {
32
33
  ;
33
34
  ws.removeAllListeners?.();
34
35
  ws.close();
35
36
  }));
36
- const recv = (ws) => Stream.asyncEffect((emit) => Effect.sync(() => {
37
+ const recv = (ws) => tsplus_module_3.asyncEffect((emit) => tsplus_module_1.sync(() => {
37
38
  ws.addEventListener("message", (message) => {
38
39
  emit.single(message.data);
39
40
  });
@@ -46,17 +47,17 @@ const recv = (ws) => Stream.asyncEffect((emit) => Effect.sync(() => {
46
47
  }));
47
48
  const send = (ws, take, log) => tsplus_module_1.forever(tsplus_module_1.tap((data) => {
48
49
  if (data === Reconnect) {
49
- return Effect.failSync(() => {
50
+ return tsplus_module_1.failSync(() => {
50
51
  ws.close(1012, "reconnecting");
51
52
  return new WebSocketCloseError(1012, "reconnecting");
52
53
  });
53
54
  }
54
- return Effect.sync(() => {
55
+ return tsplus_module_1.sync(() => {
55
56
  ws.send(data);
56
57
  });
57
58
  })(tsplus_module_1.tap((data) => log.debug("WS", "send", data))(take)));
58
- export const make = (url, takeOutbound) => pipe(tsplus_module_1.flatMap(log => tsplus_module_1.map(ws => {
59
+ export const make = (url, takeOutbound) => tsplus_module_6.pipe(tsplus_module_1.flatMap(log => tsplus_module_1.map(ws => {
59
60
  const sendEffect = send(ws, takeOutbound, log);
60
- return tsplus_module_3.retry(Schedule.recurWhile((e) => e._tag === "WebSocketCloseError" && e.code === 1012))(tsplus_module_3.merge(Stream.fromEffect(sendEffect))(recv(ws)));
61
- })(socket(url)))(Effect.service(Log)), Stream.unwrapScoped);
61
+ return tsplus_module_3.retry(tsplus_module_4.recurWhile((e) => e._tag === "WebSocketCloseError" && e.code === 1012))(tsplus_module_3.merge(tsplus_module_3.fromEffect(sendEffect))(recv(ws)));
62
+ })(socket(url)))(tsplus_module_1.service(tsplus_module_5.Log.Log)), tsplus_module_3.unwrapScoped);
62
63
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/DiscordGateway/WS/index.ts"],"names":[],"mappings":";;;AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAA;AACnC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAO,QAAQ,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACjE,OAAO,SAAS,MAAM,eAAe,CAAA;AAErC,MAAM,CAAC,MAAM,SAAS,GAAG,MAAM,EAAE,CAAA;AAIjC,MAAM,OAAO,cAAc;IAEJ;IADZ,IAAI,GAAG,gBAAgB,CAAA;IAChC,YAAqB,MAAe;QAAf,WAAM,GAAN,MAAM,CAAS;IAAG,CAAC;CACzC;AAED,MAAM,OAAO,mBAAmB;IAET;IAAuB;IADnC,IAAI,GAAG,qBAAqB,CAAA;IACrC,YAAqB,IAAY,EAAW,MAAc;QAArC,SAAI,GAAJ,IAAI,CAAQ;QAAW,WAAM,GAAN,MAAM,CAAQ;IAAG,CAAC;CAC/D;AAED,MAAM,MAAM,GAAG,CAAC,MAAuB,EAAE,EAAE,CACzC,uDACQ,GAAG;IACT,MAAM,EAAE,GAAG,IAAI,SAAS,CAAC,GAAG,CAAgC,CAAA;qCAUrD,EAAE,EAPP,MAAM,CAAC,KAAK,CAAqB,CAAC,MAAM,EAAE,EAAE;QAC1C,EAAE,CAAC,gBAAgB,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,EAAE;YACvD,IAAI,EAAE,IAAI;SACX,CAAC,CAAA;IACJ,CAAC,CAAC;uBARU,MAAM,IAYJ,CAAC,EAAE,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AC,CAAC,CACH,CAAA;AAEH,MAAM,IAAI,GAAG,CACX,EAAwB,EACxB,IAAmC,EACnC,GAAY,EACZ,EAAE,yBACF,oBAEO,CAAC,IAAI,EAA4C,EAAE;IACtD,IAAI,IAAI,KAAK,SAAS,EAAE;QACtB,OAAO,yBAAgB,GAAG,EAAE;YAC1B,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,cAAc,CAAC,CAAA;YAC9B,OAAO,IAAI,mBAAmB,CAAC,IAAI,EAAE,cAAc,CAAC,CAAA;QACtD,CAAC,CAAC,CAAA;KACH;IAED,OAAO,qBAAY,GAAG,EAAE;QACtB,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IACf,CAAC,CAAC,CAAA;AACJ,CAAC,EAbH,oBACO,CAAC,IAAI,EAAE,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAD9C,IAAI,CAC2C,CAY3C,CAAQ,CAAA;AAEd,MAAM,CAAC,MAAM,IAAI,GAAG,CAClB,GAAgB,EAChB,YAA2C,EAC3C,EAAE,CACF,gBAAA,IAAI,yBAEM,GAAG,wBACH,EAAE;IACR,MAAM,UAAU,GAAG,IAAI,CAAC,EAAE,EAAE,YAAY,EAAE,GAAG,CAAC,CAAA;IAE9C,OAAO,sBAGH,2BACE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,qBAAqB,IAAI,CAAC,CAAC,IAAI,KAAK,IAAI,CAC3D,EALE,sBACE,2BAAkB,UAAU,CAAC,EAD/B,IAAI,CAAC,EAAE,CAAC,CACwB,CAKpC,CAAA;GATU,MAAM,CAAC,GAAG,CAAC,GADV,wBAAe,gBAAA,GAAG,CAAC,GAAG,CAAC,gCAaxC,CAAA"}
@@ -1,13 +1,13 @@
1
+ import { Stream, Discord, Effect } from "dfx/_common";
1
2
  import { Success } from "dfx/utils/effect";
2
- import { Context, Discord, Effect, Layer, Scope, Stream } from "dfx/_common";
3
3
  import { Sharder } from "./Sharder/index.js";
4
- export declare const make: Effect.Effect<Scope.Scope | Sharder, never, {
5
- raw: Stream.Stream<never, never, Discord.GatewayPayload<any>>;
6
- dispatch: Stream.Stream<never, never, Discord.GatewayPayload<Discord.ReceiveEvent>>;
7
- fromDispatch: <K extends keyof Discord.ReceiveEvents>(event: K) => Stream.Stream<never, never, Discord.ReceiveEvents[K]>;
8
- handleDispatch: <K_1 extends keyof Discord.ReceiveEvents, R1, E1, A>(event: K_1, handle: (event: Discord.ReceiveEvents[K_1]) => Effect.Effect<R1, E1, A>) => Effect.Effect<R1, E1, void>;
4
+ export declare const make: import("../_common.js").Effect<import("../_common.js").Scope | Sharder, never, {
5
+ raw: import("../_common.js").Stream<never, never, import("../types.js").GatewayPayload<any>>;
6
+ dispatch: import("../_common.js").Stream<never, never, import("../types.js").GatewayPayload<import("../types.js").ReceiveEvent>>;
7
+ fromDispatch: <K extends keyof import("../types.js").ReceiveEvents>(event: K) => import("../_common.js").Stream<never, never, import("../types.js").ReceiveEvents[K]>;
8
+ handleDispatch: <K_1 extends keyof import("../types.js").ReceiveEvents, R1, E1, A>(event: K_1, handle: (event: import("../types.js").ReceiveEvents[K_1]) => import("../_common.js").Effect<R1, E1, A>) => import("../_common.js").Effect<R1, E1, void>;
9
9
  }>;
10
10
  export interface DiscordGateway extends Success<typeof make> {
11
11
  }
12
- export declare const DiscordGateway: Context.Tag<DiscordGateway>;
13
- export declare const LiveDiscordGateway: Layer.Layer<Sharder, never, DiscordGateway>;
12
+ export declare const DiscordGateway: import("../_common.js").Tag<DiscordGateway>;
13
+ export declare const LiveDiscordGateway: import("../_common.js").Layer<Sharder, never, DiscordGateway>;
@@ -1,11 +1,12 @@
1
1
  import * as tsplus_module_1 from "@effect/stream/Stream";
2
- import * as tsplus_module_2 from "@effect/io/Effect";
3
- import { Context, Effect, Layer, pipe, Scope, Stream, } from "dfx/_common";
2
+ import * as tsplus_module_2 from "@fp-ts/data/Function";
3
+ import * as tsplus_module_3 from "@effect/io/Effect";
4
+ import * as tsplus_module_4 from "dfx/_common";
5
+ import * as tsplus_module_5 from "@effect/io/Layer";
4
6
  import { Sharder } from "./Sharder/index.js";
5
- const _scope = Scope.ScopeTypeId;
6
7
  const fromDispatchFactory = (source) => (event) => tsplus_module_1.map((p) => p.d)(tsplus_module_1.filter((p) => p.t === event)(source));
7
- const handleDispatchFactory = (source) => (event, handle) => tsplus_module_1.runDrain(pipe(tsplus_module_1.filter((p) => p.t === event)(source), Stream.flatMapPar(128)((a) => Stream.fromEffect(handle(a.d)))));
8
- export const make = tsplus_module_2.flatMap(sharder => tsplus_module_2.flatMap(raw => tsplus_module_2.map(dispatch => {
8
+ const handleDispatchFactory = (source) => (event, handle) => tsplus_module_1.runDrain(tsplus_module_2.pipe(tsplus_module_1.filter((p) => p.t === event)(source), tsplus_module_1.flatMapPar(128)((a) => tsplus_module_1.fromEffect(handle(a.d)))));
9
+ export const make = tsplus_module_3.flatMap(sharder => tsplus_module_3.flatMap(raw => tsplus_module_3.map(dispatch => {
9
10
  const fromDispatch = fromDispatchFactory(dispatch);
10
11
  const handleDispatch = handleDispatchFactory(dispatch);
11
12
  return {
@@ -14,7 +15,7 @@ export const make = tsplus_module_2.flatMap(sharder => tsplus_module_2.flatMap(r
14
15
  fromDispatch,
15
16
  handleDispatch,
16
17
  };
17
- })(tsplus_module_1.broadcastDynamic(1)(pipe(sharder.shards, Stream.flatMapPar(1024)((s) => s.dispatch)))))(tsplus_module_1.broadcastDynamic(1)(pipe(sharder.shards, Stream.flatMapPar(1024)((s) => s.raw)))))(Effect.service(Sharder));
18
- export const DiscordGateway = Context.Tag();
19
- export const LiveDiscordGateway = Layer.scoped(DiscordGateway)(make);
18
+ })(tsplus_module_1.broadcastDynamic(1)(tsplus_module_2.pipe(sharder.shards, tsplus_module_1.flatMapPar(1024)((s) => s.dispatch)))))(tsplus_module_1.broadcastDynamic(1)(tsplus_module_2.pipe(sharder.shards, tsplus_module_1.flatMapPar(1024)((s) => s.raw)))))(tsplus_module_3.service(Sharder));
19
+ export const DiscordGateway = tsplus_module_4.Tag();
20
+ export const LiveDiscordGateway = tsplus_module_5.scoped(DiscordGateway)(make);
20
21
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/DiscordGateway/index.ts"],"names":[],"mappings":";;AACA,OAAO,EACL,OAAO,EAEP,MAAM,EACN,KAAK,EACL,IAAI,EACJ,KAAK,EACL,MAAM,GACP,MAAM,aAAa,CAAA;AACpB,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAA;AAE5C,MAAM,MAAM,GAAG,KAAK,CAAC,WAAW,CAAA;AAEhC,MAAM,mBAAmB,GACvB,CACE,MAAyE,EACzE,EAAE,CACJ,CACE,KAAQ,EACuC,EAAE,CACjD,oBAAwC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAS,EAA1D,uBAAc,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,KAAK,EAAlC,MAAM,CAA6B,CAAwB,CAAA;AAE/D,MAAM,qBAAqB,GACzB,CACE,MAAyE,EACzE,EAAE,CACJ,CACE,KAAQ,EACR,MAAqE,EAChC,EAAE,0BACvC,IAAI,CACF,uBAAc,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,KAAK,EAAlC,MAAM,CAA6B,EACnC,MAAM,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAQ,CAAC,CAAC,CAAC,CACrE,CAAS,CAAA;AAEd,MAAM,CAAC,MAAM,IAAI,2BACT,OAAO,4BACP,GAAG,wBAMH,QAAQ;IAMd,MAAM,YAAY,GAAG,mBAAmB,CAAC,QAAQ,CAAC,CAAA;IAClD,MAAM,cAAc,GAAG,qBAAqB,CAAC,QAAQ,CAA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,CAA6B,EACnC,2BAAkB,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,2BAAkB,MAAM,CAAC,CAAC,CAAC,CAAQ,CAAC,CAAC,CAAC,CACrE,CAAS,CAAA;AAEd,MAAM,CAAC,MAAM,IAAI,2BACT,OAAO,4BACP,GAAG,wBAMH,QAAQ;IAMd,MAAM,YAAY,GAAG,mBAAmB,CAAC,QAAQ,CAAC,CAAA;IAClD,MAAM,cAAc,GAAG,qBAAqB,CAAC,QAAQ,CAAC,CAAA;IAEtD,OAAO;QACL,GAAG;QACH,QAAQ;QACR,YAAY;QACZ,cAAc;KACf,CAAA;GAbC,iCAGmB,CAAC,EAHpB,gBAAA,IAAI,CACF,OAAO,CAAC,MAAM,EACd,2BAAkB,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,CAC3C,CAAoB,GATrB,iCAGmB,CAAC,EAHpB,gBAAA,IAAI,CACF,OAAO,CAAC,MAAM,EACd,2BAAkB,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CACtC,CAAoB,GALL,wBAAe,OAAO,CAAC,CAsBzC,CAAA;AAGF,MAAM,CAAC,MAAM,cAAc,GAAG,gBAAA,GAAG,EAAkB,CAAA;AACnD,MAAM,CAAC,MAAM,kBAAkB,GAAG,uBAAY,cAAc,EAA1B,IAAI,CAAuB,CAAA"}
@@ -1,43 +1,43 @@
1
- import { Config, FetchError, Http, JsonParseError, Log, RateLimiter, RateLimitStore, StatusCodeError } from "dfx";
1
+ import { BucketDetails, FetchError, StatusCodeError, JsonParseError } from "dfx";
2
+ import { Effect, Discord } from "dfx/_common";
2
3
  import { Success } from "dfx/utils/effect";
3
- import { Context, Discord, Effect, Layer } from "dfx/_common";
4
4
  import { ResponseWithData, RestResponse } from "./types.js";
5
- declare const make: Effect.Effect<Config.DiscordConfig | Http | Log.Log | RateLimitStore | RateLimiter, never, {
6
- addGuildMember: (guildId: string, userId: string, params?: Partial<Discord.AddGuildMemberParams> | undefined, options?: RequestInit | undefined) => RestResponse<Discord.GuildMember>;
5
+ declare const make: import("../_common.js").Effect<import("../DiscordConfig/index.js").DiscordConfig | import("../index.js").Http | import("../Log/index.js").Log | import("../index.js").RateLimitStore | import("../index.js").RateLimiter, never, {
6
+ addGuildMember: (guildId: string, userId: string, params?: Partial<import("../types.js").AddGuildMemberParams> | undefined, options?: RequestInit | undefined) => RestResponse<import("../types.js").GuildMember>;
7
7
  addGuildMemberRole: (guildId: string, userId: string, roleId: string, options?: RequestInit | undefined) => RestResponse<any>;
8
8
  addThreadMember: (channelId: string, userId: string, options?: RequestInit | undefined) => RestResponse<any>;
9
9
  batchEditApplicationCommandPermissions: (applicationId: string, guildId: string, options?: RequestInit | undefined) => RestResponse<any>;
10
- beginGuildPrune: (guildId: string, params?: Partial<Discord.BeginGuildPruneParams> | undefined, options?: RequestInit | undefined) => RestResponse<any>;
11
- bulkDeleteMessages: (channelId: string, params?: Partial<Discord.BulkDeleteMessageParams> | undefined, options?: RequestInit | undefined) => RestResponse<any>;
12
- bulkOverwriteGlobalApplicationCommands: (applicationId: string, options?: RequestInit | undefined) => RestResponse<Discord.ApplicationCommand[]>;
13
- bulkOverwriteGuildApplicationCommands: (applicationId: string, guildId: string, params?: Partial<Discord.BulkOverwriteGuildApplicationCommandParams> | undefined, options?: RequestInit | undefined) => RestResponse<Discord.ApplicationCommand[]>;
14
- createAutoModerationRule: (guildId: string, params?: Partial<Discord.CreateAutoModerationRuleParams> | undefined, options?: RequestInit | undefined) => RestResponse<Discord.AutoModerationRule>;
15
- createChannelInvite: (channelId: string, params?: Partial<Discord.CreateChannelInviteParams> | undefined, options?: RequestInit | undefined) => RestResponse<Discord.Invite>;
16
- createDm: (params?: Partial<Discord.CreateDmParams> | undefined, options?: RequestInit | undefined) => RestResponse<Discord.Channel>;
10
+ beginGuildPrune: (guildId: string, params?: Partial<import("../types.js").BeginGuildPruneParams> | undefined, options?: RequestInit | undefined) => RestResponse<any>;
11
+ bulkDeleteMessages: (channelId: string, params?: Partial<import("../types.js").BulkDeleteMessageParams> | undefined, options?: RequestInit | undefined) => RestResponse<any>;
12
+ bulkOverwriteGlobalApplicationCommands: (applicationId: string, options?: RequestInit | undefined) => RestResponse<import("../types.js").ApplicationCommand[]>;
13
+ bulkOverwriteGuildApplicationCommands: (applicationId: string, guildId: string, params?: Partial<import("../types.js").BulkOverwriteGuildApplicationCommandParams> | undefined, options?: RequestInit | undefined) => RestResponse<import("../types.js").ApplicationCommand[]>;
14
+ createAutoModerationRule: (guildId: string, params?: Partial<import("../types.js").CreateAutoModerationRuleParams> | undefined, options?: RequestInit | undefined) => RestResponse<import("../types.js").AutoModerationRule>;
15
+ createChannelInvite: (channelId: string, params?: Partial<import("../types.js").CreateChannelInviteParams> | undefined, options?: RequestInit | undefined) => RestResponse<import("../types.js").Invite>;
16
+ createDm: (params?: Partial<import("../types.js").CreateDmParams> | undefined, options?: RequestInit | undefined) => RestResponse<import("../types.js").Channel>;
17
17
  createFollowupMessage: (applicationId: string, interactionToken: string, options?: RequestInit | undefined) => RestResponse<any>;
18
- createGlobalApplicationCommand: (applicationId: string, params?: Partial<Discord.CreateGlobalApplicationCommandParams> | undefined, options?: RequestInit | undefined) => RestResponse<Discord.ApplicationCommand>;
19
- createGroupDm: (params?: Partial<Discord.CreateGroupDmParams> | undefined, options?: RequestInit | undefined) => RestResponse<Discord.Channel>;
20
- createGuild: (params?: Partial<Discord.CreateGuildParams> | undefined, options?: RequestInit | undefined) => RestResponse<Discord.Guild>;
21
- createGuildApplicationCommand: (applicationId: string, guildId: string, params?: Partial<Discord.CreateGuildApplicationCommandParams> | undefined, options?: RequestInit | undefined) => RestResponse<Discord.ApplicationCommand>;
22
- createGuildBan: (guildId: string, userId: string, params?: Partial<Discord.CreateGuildBanParams> | undefined, options?: RequestInit | undefined) => RestResponse<any>;
23
- createGuildChannel: (guildId: string, params?: Partial<Discord.CreateGuildChannelParams> | undefined, options?: RequestInit | undefined) => RestResponse<Discord.Channel>;
24
- createGuildEmoji: (guildId: string, params?: Partial<Discord.CreateGuildEmojiParams> | undefined, options?: RequestInit | undefined) => RestResponse<Discord.Emoji>;
25
- createGuildFromGuildTemplate: (templateCode: string, params?: Partial<Discord.CreateGuildFromGuildTemplateParams> | undefined, options?: RequestInit | undefined) => RestResponse<Discord.Guild>;
26
- createGuildRole: (guildId: string, params?: Partial<Discord.CreateGuildRoleParams> | undefined, options?: RequestInit | undefined) => RestResponse<Discord.Role>;
27
- createGuildScheduledEvent: (guildId: string, params?: Partial<Discord.CreateGuildScheduledEventParams> | undefined, options?: RequestInit | undefined) => RestResponse<Discord.GuildScheduledEvent>;
28
- createGuildSticker: (guildId: string, params?: Partial<Discord.CreateGuildStickerParams> | undefined, options?: RequestInit | undefined) => RestResponse<Discord.Sticker>;
29
- createGuildTemplate: (guildId: string, params?: Partial<Discord.CreateGuildTemplateParams> | undefined, options?: RequestInit | undefined) => RestResponse<Discord.GuildTemplate>;
30
- createInteractionResponse: (interactionId: string, interactionToken: string, params?: Partial<Discord.InteractionResponse> | undefined, options?: RequestInit | undefined) => RestResponse<Discord.InteractionResponse>;
31
- createMessage: (channelId: string, params?: Partial<Discord.CreateMessageParams> | undefined, options?: RequestInit | undefined) => RestResponse<Discord.Message>;
18
+ createGlobalApplicationCommand: (applicationId: string, params?: Partial<import("../types.js").CreateGlobalApplicationCommandParams> | undefined, options?: RequestInit | undefined) => RestResponse<import("../types.js").ApplicationCommand>;
19
+ createGroupDm: (params?: Partial<import("../types.js").CreateGroupDmParams> | undefined, options?: RequestInit | undefined) => RestResponse<import("../types.js").Channel>;
20
+ createGuild: (params?: Partial<import("../types.js").CreateGuildParams> | undefined, options?: RequestInit | undefined) => RestResponse<import("../types.js").Guild>;
21
+ createGuildApplicationCommand: (applicationId: string, guildId: string, params?: Partial<import("../types.js").CreateGuildApplicationCommandParams> | undefined, options?: RequestInit | undefined) => RestResponse<import("../types.js").ApplicationCommand>;
22
+ createGuildBan: (guildId: string, userId: string, params?: Partial<import("../types.js").CreateGuildBanParams> | undefined, options?: RequestInit | undefined) => RestResponse<any>;
23
+ createGuildChannel: (guildId: string, params?: Partial<import("../types.js").CreateGuildChannelParams> | undefined, options?: RequestInit | undefined) => RestResponse<import("../types.js").Channel>;
24
+ createGuildEmoji: (guildId: string, params?: Partial<import("../types.js").CreateGuildEmojiParams> | undefined, options?: RequestInit | undefined) => RestResponse<import("../types.js").Emoji>;
25
+ createGuildFromGuildTemplate: (templateCode: string, params?: Partial<import("../types.js").CreateGuildFromGuildTemplateParams> | undefined, options?: RequestInit | undefined) => RestResponse<import("../types.js").Guild>;
26
+ createGuildRole: (guildId: string, params?: Partial<import("../types.js").CreateGuildRoleParams> | undefined, options?: RequestInit | undefined) => RestResponse<import("../types.js").Role>;
27
+ createGuildScheduledEvent: (guildId: string, params?: Partial<import("../types.js").CreateGuildScheduledEventParams> | undefined, options?: RequestInit | undefined) => RestResponse<import("../types.js").GuildScheduledEvent>;
28
+ createGuildSticker: (guildId: string, params?: Partial<import("../types.js").CreateGuildStickerParams> | undefined, options?: RequestInit | undefined) => RestResponse<import("../types.js").Sticker>;
29
+ createGuildTemplate: (guildId: string, params?: Partial<import("../types.js").CreateGuildTemplateParams> | undefined, options?: RequestInit | undefined) => RestResponse<import("../types.js").GuildTemplate>;
30
+ createInteractionResponse: (interactionId: string, interactionToken: string, params?: Partial<import("../types.js").InteractionResponse> | undefined, options?: RequestInit | undefined) => RestResponse<import("../types.js").InteractionResponse>;
31
+ createMessage: (channelId: string, params?: Partial<import("../types.js").CreateMessageParams> | undefined, options?: RequestInit | undefined) => RestResponse<import("../types.js").Message>;
32
32
  createReaction: (channelId: string, messageId: string, emoji: string, options?: RequestInit | undefined) => RestResponse<any>;
33
- createStageInstance: (params?: Partial<Discord.CreateStageInstanceParams> | undefined, options?: RequestInit | undefined) => RestResponse<Discord.StageInstance>;
34
- createWebhook: (channelId: string, params?: Partial<Discord.CreateWebhookParams> | undefined, options?: RequestInit | undefined) => RestResponse<Discord.Webhook>;
35
- crosspostMessage: (channelId: string, messageId: string, options?: RequestInit | undefined) => RestResponse<Discord.Message>;
33
+ createStageInstance: (params?: Partial<import("../types.js").CreateStageInstanceParams> | undefined, options?: RequestInit | undefined) => RestResponse<import("../types.js").StageInstance>;
34
+ createWebhook: (channelId: string, params?: Partial<import("../types.js").CreateWebhookParams> | undefined, options?: RequestInit | undefined) => RestResponse<import("../types.js").Webhook>;
35
+ crosspostMessage: (channelId: string, messageId: string, options?: RequestInit | undefined) => RestResponse<import("../types.js").Message>;
36
36
  deleteAllReactions: (channelId: string, messageId: string, options?: RequestInit | undefined) => RestResponse<any>;
37
37
  deleteAllReactionsForEmoji: (channelId: string, messageId: string, emoji: string, options?: RequestInit | undefined) => RestResponse<any>;
38
38
  deleteAutoModerationRule: (guildId: string, autoModerationRuleId: string, options?: RequestInit | undefined) => RestResponse<any>;
39
39
  deleteChannelPermission: (channelId: string, overwriteId: string, options?: RequestInit | undefined) => RestResponse<any>;
40
- deletecloseChannel: (channelId: string, options?: RequestInit | undefined) => RestResponse<Discord.Channel>;
40
+ deletecloseChannel: (channelId: string, options?: RequestInit | undefined) => RestResponse<import("../types.js").Channel>;
41
41
  deleteFollowupMessage: (applicationId: string, interactionToken: string, messageId: string, options?: RequestInit | undefined) => RestResponse<any>;
42
42
  deleteGlobalApplicationCommand: (applicationId: string, commandId: string, options?: RequestInit | undefined) => RestResponse<any>;
43
43
  deleteGuild: (guildId: string, options?: RequestInit | undefined) => RestResponse<any>;
@@ -47,143 +47,143 @@ declare const make: Effect.Effect<Config.DiscordConfig | Http | Log.Log | RateLi
47
47
  deleteGuildRole: (guildId: string, roleId: string, options?: RequestInit | undefined) => RestResponse<any>;
48
48
  deleteGuildScheduledEvent: (guildId: string, guildScheduledEventId: string, options?: RequestInit | undefined) => RestResponse<any>;
49
49
  deleteGuildSticker: (guildId: string, stickerId: string, options?: RequestInit | undefined) => RestResponse<any>;
50
- deleteGuildTemplate: (guildId: string, templateCode: string, options?: RequestInit | undefined) => RestResponse<Discord.GuildTemplate>;
51
- deleteInvite: (inviteCode: string, options?: RequestInit | undefined) => RestResponse<Discord.Invite>;
50
+ deleteGuildTemplate: (guildId: string, templateCode: string, options?: RequestInit | undefined) => RestResponse<import("../types.js").GuildTemplate>;
51
+ deleteInvite: (inviteCode: string, options?: RequestInit | undefined) => RestResponse<import("../types.js").Invite>;
52
52
  deleteMessage: (channelId: string, messageId: string, options?: RequestInit | undefined) => RestResponse<any>;
53
53
  deleteOriginalInteractionResponse: (applicationId: string, interactionToken: string, options?: RequestInit | undefined) => RestResponse<any>;
54
54
  deleteOwnReaction: (channelId: string, messageId: string, emoji: string, options?: RequestInit | undefined) => RestResponse<any>;
55
55
  deleteStageInstance: (channelId: string, options?: RequestInit | undefined) => RestResponse<any>;
56
56
  deleteUserReaction: (channelId: string, messageId: string, emoji: string, userId: string, options?: RequestInit | undefined) => RestResponse<any>;
57
57
  deleteWebhook: (webhookId: string, options?: RequestInit | undefined) => RestResponse<any>;
58
- deleteWebhookMessage: (webhookId: string, webhookToken: string, messageId: string, params?: Partial<Discord.DeleteWebhookMessageParams> | undefined, options?: RequestInit | undefined) => RestResponse<any>;
58
+ deleteWebhookMessage: (webhookId: string, webhookToken: string, messageId: string, params?: Partial<import("../types.js").DeleteWebhookMessageParams> | undefined, options?: RequestInit | undefined) => RestResponse<any>;
59
59
  deleteWebhookWithToken: (webhookId: string, webhookToken: string, options?: RequestInit | undefined) => RestResponse<any>;
60
- editApplicationCommandPermissions: (applicationId: string, guildId: string, commandId: string, params?: Partial<Discord.EditApplicationCommandPermissionParams> | undefined, options?: RequestInit | undefined) => RestResponse<Discord.GuildApplicationCommandPermission>;
61
- editChannelPermissions: (channelId: string, overwriteId: string, params?: Partial<Discord.EditChannelPermissionParams> | undefined, options?: RequestInit | undefined) => RestResponse<any>;
60
+ editApplicationCommandPermissions: (applicationId: string, guildId: string, commandId: string, params?: Partial<import("../types.js").EditApplicationCommandPermissionParams> | undefined, options?: RequestInit | undefined) => RestResponse<import("../types.js").GuildApplicationCommandPermission>;
61
+ editChannelPermissions: (channelId: string, overwriteId: string, params?: Partial<import("../types.js").EditChannelPermissionParams> | undefined, options?: RequestInit | undefined) => RestResponse<any>;
62
62
  editFollowupMessage: (applicationId: string, interactionToken: string, messageId: string, options?: RequestInit | undefined) => RestResponse<any>;
63
- editGlobalApplicationCommand: (applicationId: string, commandId: string, params?: Partial<Discord.EditGlobalApplicationCommandParams> | undefined, options?: RequestInit | undefined) => RestResponse<Discord.ApplicationCommand>;
64
- editGuildApplicationCommand: (applicationId: string, guildId: string, commandId: string, params?: Partial<Discord.EditGuildApplicationCommandParams> | undefined, options?: RequestInit | undefined) => RestResponse<Discord.ApplicationCommand>;
65
- editMessage: (channelId: string, messageId: string, params?: Partial<Discord.EditMessageParams> | undefined, options?: RequestInit | undefined) => RestResponse<Discord.Message>;
63
+ editGlobalApplicationCommand: (applicationId: string, commandId: string, params?: Partial<import("../types.js").EditGlobalApplicationCommandParams> | undefined, options?: RequestInit | undefined) => RestResponse<import("../types.js").ApplicationCommand>;
64
+ editGuildApplicationCommand: (applicationId: string, guildId: string, commandId: string, params?: Partial<import("../types.js").EditGuildApplicationCommandParams> | undefined, options?: RequestInit | undefined) => RestResponse<import("../types.js").ApplicationCommand>;
65
+ editMessage: (channelId: string, messageId: string, params?: Partial<import("../types.js").EditMessageParams> | undefined, options?: RequestInit | undefined) => RestResponse<import("../types.js").Message>;
66
66
  editOriginalInteractionResponse: (applicationId: string, interactionToken: string, options?: RequestInit | undefined) => RestResponse<any>;
67
- editWebhookMessage: (webhookId: string, webhookToken: string, messageId: string, params?: Partial<Discord.EditWebhookMessageParams> | undefined, options?: RequestInit | undefined) => RestResponse<Discord.Message>;
67
+ editWebhookMessage: (webhookId: string, webhookToken: string, messageId: string, params?: Partial<import("../types.js").EditWebhookMessageParams> | undefined, options?: RequestInit | undefined) => RestResponse<import("../types.js").Message>;
68
68
  executeGitHubCompatibleWebhook: (webhookId: string, webhookToken: string, options?: RequestInit | undefined) => RestResponse<any>;
69
69
  executeSlackCompatibleWebhook: (webhookId: string, webhookToken: string, options?: RequestInit | undefined) => RestResponse<any>;
70
- executeWebhook: (webhookId: string, webhookToken: string, params?: Partial<Discord.ExecuteWebhookParams> | undefined, options?: RequestInit | undefined) => RestResponse<any>;
71
- followAnnouncementChannel: (channelId: string, params?: Partial<Discord.FollowAnnouncementChannelParams> | undefined, options?: RequestInit | undefined) => RestResponse<Discord.FollowedChannel>;
72
- getApplicationCommandPermissions: (applicationId: string, guildId: string, commandId: string, options?: RequestInit | undefined) => RestResponse<Discord.GuildApplicationCommandPermission>;
73
- getApplicationRoleConnectionMetadataRecords: (applicationId: string, options?: RequestInit | undefined) => RestResponse<Discord.ApplicationRoleConnectionMetadatum[]>;
74
- getAutoModerationRule: (guildId: string, autoModerationRuleId: string, options?: RequestInit | undefined) => RestResponse<Discord.AutoModerationRule>;
75
- getChannel: (channelId: string, options?: RequestInit | undefined) => RestResponse<Discord.Channel>;
76
- getChannelInvites: (channelId: string, options?: RequestInit | undefined) => RestResponse<Discord.Invite[]>;
77
- getChannelMessage: (channelId: string, messageId: string, options?: RequestInit | undefined) => RestResponse<Discord.Message>;
78
- getChannelMessages: (channelId: string, params?: Partial<Discord.GetChannelMessageParams> | undefined, options?: RequestInit | undefined) => RestResponse<Discord.Message[]>;
79
- getChannelWebhooks: (channelId: string, options?: RequestInit | undefined) => RestResponse<Discord.Webhook[]>;
80
- getCurrentAuthorizationInformation: (options?: RequestInit | undefined) => RestResponse<Discord.GetCurrentAuthorizationInformationResponse>;
81
- getCurrentBotApplicationInformation: (options?: RequestInit | undefined) => RestResponse<Discord.Application>;
82
- getCurrentUser: (options?: RequestInit | undefined) => RestResponse<Discord.User>;
83
- getCurrentUserGuildMember: (guildId: string, options?: RequestInit | undefined) => RestResponse<Discord.GuildMember>;
84
- getCurrentUserGuilds: (params?: Partial<Discord.GetCurrentUserGuildParams> | undefined, options?: RequestInit | undefined) => RestResponse<Discord.Guild[]>;
70
+ executeWebhook: (webhookId: string, webhookToken: string, params?: Partial<import("../types.js").ExecuteWebhookParams> | undefined, options?: RequestInit | undefined) => RestResponse<any>;
71
+ followAnnouncementChannel: (channelId: string, params?: Partial<import("../types.js").FollowAnnouncementChannelParams> | undefined, options?: RequestInit | undefined) => RestResponse<import("../types.js").FollowedChannel>;
72
+ getApplicationCommandPermissions: (applicationId: string, guildId: string, commandId: string, options?: RequestInit | undefined) => RestResponse<import("../types.js").GuildApplicationCommandPermission>;
73
+ getApplicationRoleConnectionMetadataRecords: (applicationId: string, options?: RequestInit | undefined) => RestResponse<import("../types.js").ApplicationRoleConnectionMetadatum[]>;
74
+ getAutoModerationRule: (guildId: string, autoModerationRuleId: string, options?: RequestInit | undefined) => RestResponse<import("../types.js").AutoModerationRule>;
75
+ getChannel: (channelId: string, options?: RequestInit | undefined) => RestResponse<import("../types.js").Channel>;
76
+ getChannelInvites: (channelId: string, options?: RequestInit | undefined) => RestResponse<import("../types.js").Invite[]>;
77
+ getChannelMessage: (channelId: string, messageId: string, options?: RequestInit | undefined) => RestResponse<import("../types.js").Message>;
78
+ getChannelMessages: (channelId: string, params?: Partial<import("../types.js").GetChannelMessageParams> | undefined, options?: RequestInit | undefined) => RestResponse<import("../types.js").Message[]>;
79
+ getChannelWebhooks: (channelId: string, options?: RequestInit | undefined) => RestResponse<import("../types.js").Webhook[]>;
80
+ getCurrentAuthorizationInformation: (options?: RequestInit | undefined) => RestResponse<import("../types.js").GetCurrentAuthorizationInformationResponse>;
81
+ getCurrentBotApplicationInformation: (options?: RequestInit | undefined) => RestResponse<import("../types.js").Application>;
82
+ getCurrentUser: (options?: RequestInit | undefined) => RestResponse<import("../types.js").User>;
83
+ getCurrentUserGuildMember: (guildId: string, options?: RequestInit | undefined) => RestResponse<import("../types.js").GuildMember>;
84
+ getCurrentUserGuilds: (params?: Partial<import("../types.js").GetCurrentUserGuildParams> | undefined, options?: RequestInit | undefined) => RestResponse<import("../types.js").Guild[]>;
85
85
  getFollowupMessage: (applicationId: string, interactionToken: string, messageId: string, options?: RequestInit | undefined) => RestResponse<any>;
86
86
  getGateway: (options?: RequestInit | undefined) => RestResponse<any>;
87
- getGatewayBot: (options?: RequestInit | undefined) => RestResponse<Discord.GetGatewayBotResponse>;
88
- getGlobalApplicationCommand: (applicationId: string, commandId: string, options?: RequestInit | undefined) => RestResponse<Discord.ApplicationCommand>;
89
- getGlobalApplicationCommands: (applicationId: string, params?: Partial<Discord.GetGlobalApplicationCommandParams> | undefined, options?: RequestInit | undefined) => RestResponse<Discord.ApplicationCommand[]>;
90
- getGuild: (guildId: string, params?: Partial<Discord.GetGuildParams> | undefined, options?: RequestInit | undefined) => RestResponse<Discord.Guild>;
91
- getGuildApplicationCommand: (applicationId: string, guildId: string, commandId: string, options?: RequestInit | undefined) => RestResponse<Discord.ApplicationCommand>;
92
- getGuildApplicationCommandPermissions: (applicationId: string, guildId: string, options?: RequestInit | undefined) => RestResponse<Discord.GuildApplicationCommandPermission[]>;
93
- getGuildApplicationCommands: (applicationId: string, guildId: string, params?: Partial<Discord.GetGuildApplicationCommandParams> | undefined, options?: RequestInit | undefined) => RestResponse<Discord.ApplicationCommand[]>;
94
- getGuildAuditLog: (guildId: string, params?: Partial<Discord.GetGuildAuditLogParams> | undefined, options?: RequestInit | undefined) => RestResponse<Discord.AuditLog>;
95
- getGuildBan: (guildId: string, userId: string, options?: RequestInit | undefined) => RestResponse<Discord.Ban>;
96
- getGuildBans: (guildId: string, params?: Partial<Discord.GetGuildBanParams> | undefined, options?: RequestInit | undefined) => RestResponse<Discord.Ban[]>;
97
- getGuildChannels: (guildId: string, options?: RequestInit | undefined) => RestResponse<Discord.Channel[]>;
98
- getGuildEmoji: (guildId: string, emojiId: string, options?: RequestInit | undefined) => RestResponse<Discord.Emoji>;
99
- getGuildIntegrations: (guildId: string, options?: RequestInit | undefined) => RestResponse<Discord.Integration[]>;
100
- getGuildInvites: (guildId: string, options?: RequestInit | undefined) => RestResponse<Discord.Invite[]>;
101
- getGuildMember: (guildId: string, userId: string, options?: RequestInit | undefined) => RestResponse<Discord.GuildMember>;
102
- getGuildPreview: (guildId: string, options?: RequestInit | undefined) => RestResponse<Discord.GuildPreview>;
103
- getGuildPruneCount: (guildId: string, params?: Partial<Discord.GetGuildPruneCountParams> | undefined, options?: RequestInit | undefined) => RestResponse<any>;
104
- getGuildRoles: (guildId: string, options?: RequestInit | undefined) => RestResponse<Discord.Role[]>;
105
- getGuildScheduledEvent: (guildId: string, guildScheduledEventId: string, params?: Partial<Discord.GetGuildScheduledEventParams> | undefined, options?: RequestInit | undefined) => RestResponse<Discord.GuildScheduledEvent>;
106
- getGuildScheduledEventUsers: (guildId: string, guildScheduledEventId: string, params?: Partial<Discord.GetGuildScheduledEventUserParams> | undefined, options?: RequestInit | undefined) => RestResponse<Discord.GuildScheduledEventUser[]>;
107
- getGuildSticker: (guildId: string, stickerId: string, options?: RequestInit | undefined) => RestResponse<Discord.Sticker>;
108
- getGuildTemplate: (templateCode: string, options?: RequestInit | undefined) => RestResponse<Discord.GuildTemplate>;
109
- getGuildTemplates: (guildId: string, options?: RequestInit | undefined) => RestResponse<Discord.GuildTemplate[]>;
110
- getGuildVanityUrl: (guildId: string, options?: RequestInit | undefined) => RestResponse<Discord.Invite>;
111
- getGuildVoiceRegions: (guildId: string, options?: RequestInit | undefined) => RestResponse<Discord.VoiceRegion[]>;
112
- getGuildWebhooks: (guildId: string, options?: RequestInit | undefined) => RestResponse<Discord.Webhook[]>;
113
- getGuildWelcomeScreen: (guildId: string, options?: RequestInit | undefined) => RestResponse<Discord.WelcomeScreen>;
114
- getGuildWidget: (guildId: string, options?: RequestInit | undefined) => RestResponse<Discord.GuildWidget>;
115
- getGuildWidgetImage: (guildId: string, params?: Partial<Discord.GetGuildWidgetImageParams> | undefined, options?: RequestInit | undefined) => RestResponse<any>;
116
- getGuildWidgetSettings: (guildId: string, options?: RequestInit | undefined) => RestResponse<Discord.GuildWidgetSetting>;
117
- getInvite: (inviteCode: string, params?: Partial<Discord.GetInviteParams> | undefined, options?: RequestInit | undefined) => RestResponse<Discord.Invite>;
87
+ getGatewayBot: (options?: RequestInit | undefined) => RestResponse<import("../types.js").GetGatewayBotResponse>;
88
+ getGlobalApplicationCommand: (applicationId: string, commandId: string, options?: RequestInit | undefined) => RestResponse<import("../types.js").ApplicationCommand>;
89
+ getGlobalApplicationCommands: (applicationId: string, params?: Partial<import("../types.js").GetGlobalApplicationCommandParams> | undefined, options?: RequestInit | undefined) => RestResponse<import("../types.js").ApplicationCommand[]>;
90
+ getGuild: (guildId: string, params?: Partial<import("../types.js").GetGuildParams> | undefined, options?: RequestInit | undefined) => RestResponse<import("../types.js").Guild>;
91
+ getGuildApplicationCommand: (applicationId: string, guildId: string, commandId: string, options?: RequestInit | undefined) => RestResponse<import("../types.js").ApplicationCommand>;
92
+ getGuildApplicationCommandPermissions: (applicationId: string, guildId: string, options?: RequestInit | undefined) => RestResponse<import("../types.js").GuildApplicationCommandPermission[]>;
93
+ getGuildApplicationCommands: (applicationId: string, guildId: string, params?: Partial<import("../types.js").GetGuildApplicationCommandParams> | undefined, options?: RequestInit | undefined) => RestResponse<import("../types.js").ApplicationCommand[]>;
94
+ getGuildAuditLog: (guildId: string, params?: Partial<import("../types.js").GetGuildAuditLogParams> | undefined, options?: RequestInit | undefined) => RestResponse<import("../types.js").AuditLog>;
95
+ getGuildBan: (guildId: string, userId: string, options?: RequestInit | undefined) => RestResponse<import("../types.js").Ban>;
96
+ getGuildBans: (guildId: string, params?: Partial<import("../types.js").GetGuildBanParams> | undefined, options?: RequestInit | undefined) => RestResponse<import("../types.js").Ban[]>;
97
+ getGuildChannels: (guildId: string, options?: RequestInit | undefined) => RestResponse<import("../types.js").Channel[]>;
98
+ getGuildEmoji: (guildId: string, emojiId: string, options?: RequestInit | undefined) => RestResponse<import("../types.js").Emoji>;
99
+ getGuildIntegrations: (guildId: string, options?: RequestInit | undefined) => RestResponse<import("../types.js").Integration[]>;
100
+ getGuildInvites: (guildId: string, options?: RequestInit | undefined) => RestResponse<import("../types.js").Invite[]>;
101
+ getGuildMember: (guildId: string, userId: string, options?: RequestInit | undefined) => RestResponse<import("../types.js").GuildMember>;
102
+ getGuildPreview: (guildId: string, options?: RequestInit | undefined) => RestResponse<import("../types.js").GuildPreview>;
103
+ getGuildPruneCount: (guildId: string, params?: Partial<import("../types.js").GetGuildPruneCountParams> | undefined, options?: RequestInit | undefined) => RestResponse<any>;
104
+ getGuildRoles: (guildId: string, options?: RequestInit | undefined) => RestResponse<import("../types.js").Role[]>;
105
+ getGuildScheduledEvent: (guildId: string, guildScheduledEventId: string, params?: Partial<import("../types.js").GetGuildScheduledEventParams> | undefined, options?: RequestInit | undefined) => RestResponse<import("../types.js").GuildScheduledEvent>;
106
+ getGuildScheduledEventUsers: (guildId: string, guildScheduledEventId: string, params?: Partial<import("../types.js").GetGuildScheduledEventUserParams> | undefined, options?: RequestInit | undefined) => RestResponse<import("../types.js").GuildScheduledEventUser[]>;
107
+ getGuildSticker: (guildId: string, stickerId: string, options?: RequestInit | undefined) => RestResponse<import("../types.js").Sticker>;
108
+ getGuildTemplate: (templateCode: string, options?: RequestInit | undefined) => RestResponse<import("../types.js").GuildTemplate>;
109
+ getGuildTemplates: (guildId: string, options?: RequestInit | undefined) => RestResponse<import("../types.js").GuildTemplate[]>;
110
+ getGuildVanityUrl: (guildId: string, options?: RequestInit | undefined) => RestResponse<import("../types.js").Invite>;
111
+ getGuildVoiceRegions: (guildId: string, options?: RequestInit | undefined) => RestResponse<import("../types.js").VoiceRegion[]>;
112
+ getGuildWebhooks: (guildId: string, options?: RequestInit | undefined) => RestResponse<import("../types.js").Webhook[]>;
113
+ getGuildWelcomeScreen: (guildId: string, options?: RequestInit | undefined) => RestResponse<import("../types.js").WelcomeScreen>;
114
+ getGuildWidget: (guildId: string, options?: RequestInit | undefined) => RestResponse<import("../types.js").GuildWidget>;
115
+ getGuildWidgetImage: (guildId: string, params?: Partial<import("../types.js").GetGuildWidgetImageParams> | undefined, options?: RequestInit | undefined) => RestResponse<any>;
116
+ getGuildWidgetSettings: (guildId: string, options?: RequestInit | undefined) => RestResponse<import("../types.js").GuildWidgetSetting>;
117
+ getInvite: (inviteCode: string, params?: Partial<import("../types.js").GetInviteParams> | undefined, options?: RequestInit | undefined) => RestResponse<import("../types.js").Invite>;
118
118
  getOriginalInteractionResponse: (applicationId: string, interactionToken: string, options?: RequestInit | undefined) => RestResponse<any>;
119
- getPinnedMessages: (channelId: string, options?: RequestInit | undefined) => RestResponse<Discord.Message[]>;
120
- getReactions: (channelId: string, messageId: string, emoji: string, params?: Partial<Discord.GetReactionParams> | undefined, options?: RequestInit | undefined) => RestResponse<Discord.User[]>;
119
+ getPinnedMessages: (channelId: string, options?: RequestInit | undefined) => RestResponse<import("../types.js").Message[]>;
120
+ getReactions: (channelId: string, messageId: string, emoji: string, params?: Partial<import("../types.js").GetReactionParams> | undefined, options?: RequestInit | undefined) => RestResponse<import("../types.js").User[]>;
121
121
  getStageInstance: (channelId: string, options?: RequestInit | undefined) => RestResponse<any>;
122
- getSticker: (stickerId: string, options?: RequestInit | undefined) => RestResponse<Discord.Sticker>;
123
- getThreadMember: (channelId: string, userId: string, options?: RequestInit | undefined) => RestResponse<Discord.ThreadMember>;
124
- getUser: (userId: string, options?: RequestInit | undefined) => RestResponse<Discord.User>;
125
- getUserApplicationRoleConnection: (applicationId: string, options?: RequestInit | undefined) => RestResponse<Discord.ApplicationRoleConnection>;
126
- getUserConnections: (options?: RequestInit | undefined) => RestResponse<Discord.Connection[]>;
127
- getWebhook: (webhookId: string, options?: RequestInit | undefined) => RestResponse<Discord.Webhook>;
128
- getWebhookMessage: (webhookId: string, webhookToken: string, messageId: string, params?: Partial<Discord.GetWebhookMessageParams> | undefined, options?: RequestInit | undefined) => RestResponse<Discord.Message>;
122
+ getSticker: (stickerId: string, options?: RequestInit | undefined) => RestResponse<import("../types.js").Sticker>;
123
+ getThreadMember: (channelId: string, userId: string, options?: RequestInit | undefined) => RestResponse<import("../types.js").ThreadMember>;
124
+ getUser: (userId: string, options?: RequestInit | undefined) => RestResponse<import("../types.js").User>;
125
+ getUserApplicationRoleConnection: (applicationId: string, options?: RequestInit | undefined) => RestResponse<import("../types.js").ApplicationRoleConnection>;
126
+ getUserConnections: (options?: RequestInit | undefined) => RestResponse<import("../types.js").Connection[]>;
127
+ getWebhook: (webhookId: string, options?: RequestInit | undefined) => RestResponse<import("../types.js").Webhook>;
128
+ getWebhookMessage: (webhookId: string, webhookToken: string, messageId: string, params?: Partial<import("../types.js").GetWebhookMessageParams> | undefined, options?: RequestInit | undefined) => RestResponse<import("../types.js").Message>;
129
129
  getWebhookWithToken: (webhookId: string, webhookToken: string, options?: RequestInit | undefined) => RestResponse<any>;
130
- groupDmAddRecipient: (channelId: string, userId: string, params?: Partial<Discord.GroupDmAddRecipientParams> | undefined, options?: RequestInit | undefined) => RestResponse<any>;
130
+ groupDmAddRecipient: (channelId: string, userId: string, params?: Partial<import("../types.js").GroupDmAddRecipientParams> | undefined, options?: RequestInit | undefined) => RestResponse<any>;
131
131
  groupDmRemoveRecipient: (channelId: string, userId: string, options?: RequestInit | undefined) => RestResponse<any>;
132
132
  joinThread: (channelId: string, options?: RequestInit | undefined) => RestResponse<any>;
133
133
  leaveGuild: (guildId: string, options?: RequestInit | undefined) => RestResponse<any>;
134
134
  leaveThread: (channelId: string, options?: RequestInit | undefined) => RestResponse<any>;
135
- listActiveGuildThreads: (guildId: string, options?: RequestInit | undefined) => RestResponse<Discord.ListActiveGuildThreadResponse>;
136
- listAutoModerationRulesForGuild: (guildId: string, options?: RequestInit | undefined) => RestResponse<Discord.AutoModerationRule[]>;
137
- listGuildEmojis: (guildId: string, options?: RequestInit | undefined) => RestResponse<Discord.Emoji[]>;
138
- listGuildMembers: (guildId: string, params?: Partial<Discord.ListGuildMemberParams> | undefined, options?: RequestInit | undefined) => RestResponse<Discord.GuildMember[]>;
139
- listGuildStickers: (guildId: string, options?: RequestInit | undefined) => RestResponse<Discord.Sticker[]>;
140
- listJoinedPrivateArchivedThreads: (channelId: string, params?: Partial<Discord.ListJoinedPrivateArchivedThreadParams> | undefined, options?: RequestInit | undefined) => RestResponse<Discord.ListJoinedPrivateArchivedThreadResponse>;
135
+ listActiveGuildThreads: (guildId: string, options?: RequestInit | undefined) => RestResponse<import("../types.js").ListActiveGuildThreadResponse>;
136
+ listAutoModerationRulesForGuild: (guildId: string, options?: RequestInit | undefined) => RestResponse<import("../types.js").AutoModerationRule[]>;
137
+ listGuildEmojis: (guildId: string, options?: RequestInit | undefined) => RestResponse<import("../types.js").Emoji[]>;
138
+ listGuildMembers: (guildId: string, params?: Partial<import("../types.js").ListGuildMemberParams> | undefined, options?: RequestInit | undefined) => RestResponse<import("../types.js").GuildMember[]>;
139
+ listGuildStickers: (guildId: string, options?: RequestInit | undefined) => RestResponse<import("../types.js").Sticker[]>;
140
+ listJoinedPrivateArchivedThreads: (channelId: string, params?: Partial<import("../types.js").ListJoinedPrivateArchivedThreadParams> | undefined, options?: RequestInit | undefined) => RestResponse<import("../types.js").ListJoinedPrivateArchivedThreadResponse>;
141
141
  listNitroStickerPacks: (options?: RequestInit | undefined) => RestResponse<any>;
142
- listPrivateArchivedThreads: (channelId: string, params?: Partial<Discord.ListPrivateArchivedThreadParams> | undefined, options?: RequestInit | undefined) => RestResponse<Discord.ListPrivateArchivedThreadResponse>;
143
- listPublicArchivedThreads: (channelId: string, params?: Partial<Discord.ListPublicArchivedThreadParams> | undefined, options?: RequestInit | undefined) => RestResponse<Discord.ListPublicArchivedThreadResponse>;
144
- listScheduledEventsForGuild: (guildId: string, params?: Partial<Discord.ListScheduledEventsForGuildParams> | undefined, options?: RequestInit | undefined) => RestResponse<Discord.GuildScheduledEvent[]>;
145
- listThreadMembers: (channelId: string, options?: RequestInit | undefined) => RestResponse<Discord.ThreadMember[]>;
146
- listVoiceRegions: (options?: RequestInit | undefined) => RestResponse<Discord.VoiceRegion[]>;
147
- modifyAutoModerationRule: (guildId: string, autoModerationRuleId: string, params?: Partial<Discord.ModifyAutoModerationRuleParams> | undefined, options?: RequestInit | undefined) => RestResponse<Discord.AutoModerationRule>;
148
- modifyChannel: (channelId: string, params?: Partial<Discord.ModifyChannelParams> | undefined, options?: RequestInit | undefined) => RestResponse<Discord.Channel>;
149
- modifyCurrentMember: (guildId: string, params?: Partial<Discord.ModifyCurrentMemberParams> | undefined, options?: RequestInit | undefined) => RestResponse<any>;
150
- modifyCurrentUser: (params?: Partial<Discord.ModifyCurrentUserParams> | undefined, options?: RequestInit | undefined) => RestResponse<Discord.User>;
151
- modifyCurrentUserNick: (guildId: string, params?: Partial<Discord.ModifyCurrentUserNickParams> | undefined, options?: RequestInit | undefined) => RestResponse<any>;
152
- modifyCurrentUserVoiceState: (guildId: string, params?: Partial<Discord.ModifyCurrentUserVoiceStateParams> | undefined, options?: RequestInit | undefined) => RestResponse<any>;
153
- modifyGuild: (guildId: string, params?: Partial<Discord.ModifyGuildParams> | undefined, options?: RequestInit | undefined) => RestResponse<Discord.Guild>;
154
- modifyGuildChannelPositions: (guildId: string, params?: Partial<Discord.ModifyGuildChannelPositionParams> | undefined, options?: RequestInit | undefined) => RestResponse<any>;
155
- modifyGuildEmoji: (guildId: string, emojiId: string, params?: Partial<Discord.ModifyGuildEmojiParams> | undefined, options?: RequestInit | undefined) => RestResponse<Discord.Emoji>;
156
- modifyGuildMember: (guildId: string, userId: string, params?: Partial<Discord.ModifyGuildMemberParams> | undefined, options?: RequestInit | undefined) => RestResponse<Discord.GuildMember>;
157
- modifyGuildMfaLevel: (guildId: string, params?: Partial<Discord.ModifyGuildMfaLevelParams> | undefined, options?: RequestInit | undefined) => RestResponse<Discord.MfaLevel>;
158
- modifyGuildRole: (guildId: string, roleId: string, params?: Partial<Discord.ModifyGuildRoleParams> | undefined, options?: RequestInit | undefined) => RestResponse<Discord.Role>;
159
- modifyGuildRolePositions: (guildId: string, params?: Partial<Discord.ModifyGuildRolePositionParams> | undefined, options?: RequestInit | undefined) => RestResponse<Discord.Role[]>;
160
- modifyGuildScheduledEvent: (guildId: string, guildScheduledEventId: string, params?: Partial<Discord.ModifyGuildScheduledEventParams> | undefined, options?: RequestInit | undefined) => RestResponse<Discord.GuildScheduledEvent>;
161
- modifyGuildSticker: (guildId: string, stickerId: string, params?: Partial<Discord.ModifyGuildStickerParams> | undefined, options?: RequestInit | undefined) => RestResponse<Discord.Sticker>;
162
- modifyGuildTemplate: (guildId: string, templateCode: string, params?: Partial<Discord.ModifyGuildTemplateParams> | undefined, options?: RequestInit | undefined) => RestResponse<Discord.GuildTemplate>;
163
- modifyGuildWelcomeScreen: (guildId: string, params?: Partial<Discord.ModifyGuildWelcomeScreenParams> | undefined, options?: RequestInit | undefined) => RestResponse<Discord.WelcomeScreen>;
164
- modifyGuildWidget: (guildId: string, options?: RequestInit | undefined) => RestResponse<Discord.GuildWidgetSetting>;
165
- modifyStageInstance: (channelId: string, params?: Partial<Discord.ModifyStageInstanceParams> | undefined, options?: RequestInit | undefined) => RestResponse<Discord.StageInstance>;
166
- modifyUserVoiceState: (guildId: string, userId: string, params?: Partial<Discord.ModifyUserVoiceStateParams> | undefined, options?: RequestInit | undefined) => RestResponse<any>;
167
- modifyWebhook: (webhookId: string, params?: Partial<Discord.ModifyWebhookParams> | undefined, options?: RequestInit | undefined) => RestResponse<Discord.Webhook>;
142
+ listPrivateArchivedThreads: (channelId: string, params?: Partial<import("../types.js").ListPrivateArchivedThreadParams> | undefined, options?: RequestInit | undefined) => RestResponse<import("../types.js").ListPrivateArchivedThreadResponse>;
143
+ listPublicArchivedThreads: (channelId: string, params?: Partial<import("../types.js").ListPublicArchivedThreadParams> | undefined, options?: RequestInit | undefined) => RestResponse<import("../types.js").ListPublicArchivedThreadResponse>;
144
+ listScheduledEventsForGuild: (guildId: string, params?: Partial<import("../types.js").ListScheduledEventsForGuildParams> | undefined, options?: RequestInit | undefined) => RestResponse<import("../types.js").GuildScheduledEvent[]>;
145
+ listThreadMembers: (channelId: string, options?: RequestInit | undefined) => RestResponse<import("../types.js").ThreadMember[]>;
146
+ listVoiceRegions: (options?: RequestInit | undefined) => RestResponse<import("../types.js").VoiceRegion[]>;
147
+ modifyAutoModerationRule: (guildId: string, autoModerationRuleId: string, params?: Partial<import("../types.js").ModifyAutoModerationRuleParams> | undefined, options?: RequestInit | undefined) => RestResponse<import("../types.js").AutoModerationRule>;
148
+ modifyChannel: (channelId: string, params?: Partial<import("../types.js").ModifyChannelParams> | undefined, options?: RequestInit | undefined) => RestResponse<import("../types.js").Channel>;
149
+ modifyCurrentMember: (guildId: string, params?: Partial<import("../types.js").ModifyCurrentMemberParams> | undefined, options?: RequestInit | undefined) => RestResponse<any>;
150
+ modifyCurrentUser: (params?: Partial<import("../types.js").ModifyCurrentUserParams> | undefined, options?: RequestInit | undefined) => RestResponse<import("../types.js").User>;
151
+ modifyCurrentUserNick: (guildId: string, params?: Partial<import("../types.js").ModifyCurrentUserNickParams> | undefined, options?: RequestInit | undefined) => RestResponse<any>;
152
+ modifyCurrentUserVoiceState: (guildId: string, params?: Partial<import("../types.js").ModifyCurrentUserVoiceStateParams> | undefined, options?: RequestInit | undefined) => RestResponse<any>;
153
+ modifyGuild: (guildId: string, params?: Partial<import("../types.js").ModifyGuildParams> | undefined, options?: RequestInit | undefined) => RestResponse<import("../types.js").Guild>;
154
+ modifyGuildChannelPositions: (guildId: string, params?: Partial<import("../types.js").ModifyGuildChannelPositionParams> | undefined, options?: RequestInit | undefined) => RestResponse<any>;
155
+ modifyGuildEmoji: (guildId: string, emojiId: string, params?: Partial<import("../types.js").ModifyGuildEmojiParams> | undefined, options?: RequestInit | undefined) => RestResponse<import("../types.js").Emoji>;
156
+ modifyGuildMember: (guildId: string, userId: string, params?: Partial<import("../types.js").ModifyGuildMemberParams> | undefined, options?: RequestInit | undefined) => RestResponse<import("../types.js").GuildMember>;
157
+ modifyGuildMfaLevel: (guildId: string, params?: Partial<import("../types.js").ModifyGuildMfaLevelParams> | undefined, options?: RequestInit | undefined) => RestResponse<import("../types.js").MfaLevel>;
158
+ modifyGuildRole: (guildId: string, roleId: string, params?: Partial<import("../types.js").ModifyGuildRoleParams> | undefined, options?: RequestInit | undefined) => RestResponse<import("../types.js").Role>;
159
+ modifyGuildRolePositions: (guildId: string, params?: Partial<import("../types.js").ModifyGuildRolePositionParams> | undefined, options?: RequestInit | undefined) => RestResponse<import("../types.js").Role[]>;
160
+ modifyGuildScheduledEvent: (guildId: string, guildScheduledEventId: string, params?: Partial<import("../types.js").ModifyGuildScheduledEventParams> | undefined, options?: RequestInit | undefined) => RestResponse<import("../types.js").GuildScheduledEvent>;
161
+ modifyGuildSticker: (guildId: string, stickerId: string, params?: Partial<import("../types.js").ModifyGuildStickerParams> | undefined, options?: RequestInit | undefined) => RestResponse<import("../types.js").Sticker>;
162
+ modifyGuildTemplate: (guildId: string, templateCode: string, params?: Partial<import("../types.js").ModifyGuildTemplateParams> | undefined, options?: RequestInit | undefined) => RestResponse<import("../types.js").GuildTemplate>;
163
+ modifyGuildWelcomeScreen: (guildId: string, params?: Partial<import("../types.js").ModifyGuildWelcomeScreenParams> | undefined, options?: RequestInit | undefined) => RestResponse<import("../types.js").WelcomeScreen>;
164
+ modifyGuildWidget: (guildId: string, options?: RequestInit | undefined) => RestResponse<import("../types.js").GuildWidgetSetting>;
165
+ modifyStageInstance: (channelId: string, params?: Partial<import("../types.js").ModifyStageInstanceParams> | undefined, options?: RequestInit | undefined) => RestResponse<import("../types.js").StageInstance>;
166
+ modifyUserVoiceState: (guildId: string, userId: string, params?: Partial<import("../types.js").ModifyUserVoiceStateParams> | undefined, options?: RequestInit | undefined) => RestResponse<any>;
167
+ modifyWebhook: (webhookId: string, params?: Partial<import("../types.js").ModifyWebhookParams> | undefined, options?: RequestInit | undefined) => RestResponse<import("../types.js").Webhook>;
168
168
  modifyWebhookWithToken: (webhookId: string, webhookToken: string, options?: RequestInit | undefined) => RestResponse<any>;
169
169
  pinMessage: (channelId: string, messageId: string, options?: RequestInit | undefined) => RestResponse<any>;
170
170
  removeGuildBan: (guildId: string, userId: string, options?: RequestInit | undefined) => RestResponse<any>;
171
171
  removeGuildMember: (guildId: string, userId: string, options?: RequestInit | undefined) => RestResponse<any>;
172
172
  removeGuildMemberRole: (guildId: string, userId: string, roleId: string, options?: RequestInit | undefined) => RestResponse<any>;
173
173
  removeThreadMember: (channelId: string, userId: string, options?: RequestInit | undefined) => RestResponse<any>;
174
- searchGuildMembers: (guildId: string, params?: Partial<Discord.SearchGuildMemberParams> | undefined, options?: RequestInit | undefined) => RestResponse<Discord.GuildMember[]>;
175
- startThreadFromMessage: (channelId: string, messageId: string, params?: Partial<Discord.StartThreadFromMessageParams> | undefined, options?: RequestInit | undefined) => RestResponse<Discord.Channel>;
176
- startThreadInForumChannel: (channelId: string, params?: Partial<Discord.StartThreadInForumChannelParams> | undefined, options?: RequestInit | undefined) => RestResponse<Discord.Channel>;
177
- startThreadWithoutMessage: (channelId: string, params?: Partial<Discord.StartThreadWithoutMessageParams> | undefined, options?: RequestInit | undefined) => RestResponse<Discord.Channel>;
178
- syncGuildTemplate: (guildId: string, templateCode: string, options?: RequestInit | undefined) => RestResponse<Discord.GuildTemplate>;
174
+ searchGuildMembers: (guildId: string, params?: Partial<import("../types.js").SearchGuildMemberParams> | undefined, options?: RequestInit | undefined) => RestResponse<import("../types.js").GuildMember[]>;
175
+ startThreadFromMessage: (channelId: string, messageId: string, params?: Partial<import("../types.js").StartThreadFromMessageParams> | undefined, options?: RequestInit | undefined) => RestResponse<import("../types.js").Channel>;
176
+ startThreadInForumChannel: (channelId: string, params?: Partial<import("../types.js").StartThreadInForumChannelParams> | undefined, options?: RequestInit | undefined) => RestResponse<import("../types.js").Channel>;
177
+ startThreadWithoutMessage: (channelId: string, params?: Partial<import("../types.js").StartThreadWithoutMessageParams> | undefined, options?: RequestInit | undefined) => RestResponse<import("../types.js").Channel>;
178
+ syncGuildTemplate: (guildId: string, templateCode: string, options?: RequestInit | undefined) => RestResponse<import("../types.js").GuildTemplate>;
179
179
  triggerTypingIndicator: (channelId: string, options?: RequestInit | undefined) => RestResponse<any>;
180
180
  unpinMessage: (channelId: string, messageId: string, options?: RequestInit | undefined) => RestResponse<any>;
181
- updateApplicationRoleConnectionMetadataRecords: (applicationId: string, options?: RequestInit | undefined) => RestResponse<Discord.ApplicationRoleConnectionMetadatum[]>;
182
- updateUserApplicationRoleConnection: (applicationId: string, params?: Partial<Discord.UpdateUserApplicationRoleConnectionParams> | undefined, options?: RequestInit | undefined) => RestResponse<Discord.ApplicationRoleConnection>;
183
- request: <A = unknown>(path: string, init?: RequestInit) => Effect.Effect<never, FetchError | StatusCodeError | JsonParseError, ResponseWithData<A>>;
181
+ updateApplicationRoleConnectionMetadataRecords: (applicationId: string, options?: RequestInit | undefined) => RestResponse<import("../types.js").ApplicationRoleConnectionMetadatum[]>;
182
+ updateUserApplicationRoleConnection: (applicationId: string, params?: Partial<import("../types.js").UpdateUserApplicationRoleConnectionParams> | undefined, options?: RequestInit | undefined) => RestResponse<import("../types.js").ApplicationRoleConnection>;
183
+ request: <A = unknown>(path: string, init?: RequestInit) => import("../_common.js").Effect<never, import("../index.js").FetchError | import("../index.js").StatusCodeError | import("../index.js").JsonParseError, ResponseWithData<A>>;
184
184
  }>;
185
185
  export interface DiscordREST extends Success<typeof make> {
186
186
  }
187
- export declare const DiscordREST: Context.Tag<DiscordREST>;
188
- export declare const LiveDiscordREST: Layer.Layer<Config.DiscordConfig | Http | Log.Log | RateLimitStore | RateLimiter, never, DiscordREST>;
187
+ export declare const DiscordREST: import("../_common.js").Tag<DiscordREST>;
188
+ export declare const LiveDiscordREST: import("../_common.js").Layer<import("../DiscordConfig/index.js").DiscordConfig | import("../index.js").Http | import("../Log/index.js").Log | import("../index.js").RateLimitStore | import("../index.js").RateLimiter, never, DiscordREST>;
189
189
  export {};