dfx 0.126.1 → 1.0.0

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 (342) hide show
  1. package/.babel.cjs.json +11 -0
  2. package/.babel.mjs.json +10 -0
  3. package/.envrc +1 -0
  4. package/.gitmodules +3 -0
  5. package/.husky/pre-commit +2 -0
  6. package/.oxlintrc.json +72 -0
  7. package/.prettierignore +0 -0
  8. package/.prettierrc.json +5 -0
  9. package/.tool-versions +1 -0
  10. package/.vscode/debug.cjs +8 -0
  11. package/.vscode/launch.json +23 -0
  12. package/.vscode/settings.json +29 -0
  13. package/.vscode/tasks.json +44 -0
  14. package/AGENTS.md +15 -0
  15. package/CHANGELOG.md +1554 -0
  16. package/examples/.env.example +5 -0
  17. package/examples/interactions.ts +79 -0
  18. package/examples/readme.ts +56 -0
  19. package/examples/registry.ts +66 -0
  20. package/flake.lock +27 -0
  21. package/flake.nix +21 -0
  22. package/lerna.json +12 -0
  23. package/package.json +79 -36
  24. package/pnpm-workspace.yaml +7 -0
  25. package/scripts/generate-client.sh +10 -0
  26. package/scripts/worktree-setup.sh +8 -0
  27. package/src/Cache/memory.ts +5 -5
  28. package/src/Cache/memoryTTL.ts +11 -7
  29. package/src/Cache/prelude.ts +10 -8
  30. package/src/Cache.ts +31 -35
  31. package/src/DiscordConfig.ts +12 -16
  32. package/src/DiscordGateway/DiscordWS.ts +58 -32
  33. package/src/DiscordGateway/Messaging.ts +13 -15
  34. package/src/DiscordGateway/Shard/StateStore.ts +30 -25
  35. package/src/DiscordGateway/Shard/heartbeats.ts +25 -28
  36. package/src/DiscordGateway/Shard/identify.ts +11 -6
  37. package/src/DiscordGateway/Shard/sendEvents.ts +1 -1
  38. package/src/DiscordGateway/Shard/utils.ts +1 -1
  39. package/src/DiscordGateway/Shard.ts +39 -35
  40. package/src/DiscordGateway/ShardStore.ts +6 -7
  41. package/src/DiscordGateway/Sharder.ts +31 -29
  42. package/src/DiscordGateway.ts +15 -14
  43. package/src/DiscordREST/Generated.ts +660 -341
  44. package/src/DiscordREST/utils.ts +6 -3
  45. package/src/DiscordREST.ts +37 -41
  46. package/src/Helpers/flags.ts +10 -5
  47. package/src/Helpers/intents.ts +2 -2
  48. package/src/Helpers/interactions.ts +16 -14
  49. package/src/Helpers/members.ts +3 -3
  50. package/src/Helpers/permissions.ts +5 -5
  51. package/src/Helpers/ui.ts +16 -16
  52. package/src/Interactions/builder.ts +10 -10
  53. package/src/Interactions/commandHelper.ts +18 -29
  54. package/src/Interactions/context.ts +51 -65
  55. package/src/Interactions/definitions.ts +3 -3
  56. package/src/Interactions/gateway.ts +33 -45
  57. package/src/Interactions/handlers.ts +8 -5
  58. package/src/Interactions/index.ts +5 -5
  59. package/src/Interactions/utils.ts +6 -6
  60. package/src/Interactions/webhook.ts +31 -38
  61. package/src/RateLimit/memory.ts +3 -3
  62. package/src/RateLimit.ts +18 -15
  63. package/src/gateway.ts +21 -21
  64. package/src/index.ts +17 -17
  65. package/src/types.ts +18 -16
  66. package/src/utils/Effect.ts +38 -27
  67. package/src/webhooks.ts +7 -7
  68. package/test/index.test.ts +5 -0
  69. package/tsconfig.base.json +12 -6
  70. package/tsconfig.examples.json +0 -1
  71. package/vitest.config.ts +22 -0
  72. package/Cache/driver.d.ts +0 -24
  73. package/Cache/driver.d.ts.map +0 -1
  74. package/Cache/driver.js +0 -11
  75. package/Cache/driver.js.map +0 -1
  76. package/Cache/memory.d.ts +0 -5
  77. package/Cache/memory.d.ts.map +0 -1
  78. package/Cache/memory.js +0 -57
  79. package/Cache/memory.js.map +0 -1
  80. package/Cache/memoryTTL.d.ts +0 -23
  81. package/Cache/memoryTTL.d.ts.map +0 -1
  82. package/Cache/memoryTTL.js +0 -128
  83. package/Cache/memoryTTL.js.map +0 -1
  84. package/Cache/prelude.d.ts +0 -32
  85. package/Cache/prelude.d.ts.map +0 -1
  86. package/Cache/prelude.js +0 -143
  87. package/Cache/prelude.js.map +0 -1
  88. package/Cache.d.ts +0 -82
  89. package/Cache.d.ts.map +0 -1
  90. package/Cache.js +0 -144
  91. package/Cache.js.map +0 -1
  92. package/DiscordConfig.d.ts +0 -35
  93. package/DiscordConfig.d.ts.map +0 -1
  94. package/DiscordConfig.js +0 -42
  95. package/DiscordConfig.js.map +0 -1
  96. package/DiscordGateway/DiscordWS.d.ts +0 -37
  97. package/DiscordGateway/DiscordWS.d.ts.map +0 -1
  98. package/DiscordGateway/DiscordWS.js +0 -73
  99. package/DiscordGateway/DiscordWS.js.map +0 -1
  100. package/DiscordGateway/Messaging.d.ts +0 -393
  101. package/DiscordGateway/Messaging.d.ts.map +0 -1
  102. package/DiscordGateway/Messaging.js +0 -40
  103. package/DiscordGateway/Messaging.js.map +0 -1
  104. package/DiscordGateway/Shard/StateStore.d.ts +0 -24
  105. package/DiscordGateway/Shard/StateStore.d.ts.map +0 -1
  106. package/DiscordGateway/Shard/StateStore.js +0 -48
  107. package/DiscordGateway/Shard/StateStore.js.map +0 -1
  108. package/DiscordGateway/Shard/heartbeats.d.ts +0 -8
  109. package/DiscordGateway/Shard/heartbeats.d.ts.map +0 -1
  110. package/DiscordGateway/Shard/heartbeats.js +0 -28
  111. package/DiscordGateway/Shard/heartbeats.js.map +0 -1
  112. package/DiscordGateway/Shard/identify.d.ts +0 -12
  113. package/DiscordGateway/Shard/identify.d.ts.map +0 -1
  114. package/DiscordGateway/Shard/identify.js +0 -38
  115. package/DiscordGateway/Shard/identify.js.map +0 -1
  116. package/DiscordGateway/Shard/sendEvents.d.ts +0 -8
  117. package/DiscordGateway/Shard/sendEvents.d.ts.map +0 -1
  118. package/DiscordGateway/Shard/sendEvents.js +0 -39
  119. package/DiscordGateway/Shard/sendEvents.js.map +0 -1
  120. package/DiscordGateway/Shard/utils.d.ts +0 -6
  121. package/DiscordGateway/Shard/utils.d.ts.map +0 -1
  122. package/DiscordGateway/Shard/utils.js +0 -11
  123. package/DiscordGateway/Shard/utils.js.map +0 -1
  124. package/DiscordGateway/Shard.d.ts +0 -28
  125. package/DiscordGateway/Shard.d.ts.map +0 -1
  126. package/DiscordGateway/Shard.js +0 -149
  127. package/DiscordGateway/Shard.js.map +0 -1
  128. package/DiscordGateway/ShardStore.d.ts +0 -18
  129. package/DiscordGateway/ShardStore.d.ts.map +0 -1
  130. package/DiscordGateway/ShardStore.js +0 -31
  131. package/DiscordGateway/ShardStore.js.map +0 -1
  132. package/DiscordGateway/Sharder.d.ts +0 -13
  133. package/DiscordGateway/Sharder.d.ts.map +0 -1
  134. package/DiscordGateway/Sharder.js +0 -73
  135. package/DiscordGateway/Sharder.js.map +0 -1
  136. package/DiscordGateway.d.ts +0 -32
  137. package/DiscordGateway.d.ts.map +0 -1
  138. package/DiscordGateway.js +0 -28
  139. package/DiscordGateway.js.map +0 -1
  140. package/DiscordREST/Generated.d.ts +0 -5399
  141. package/DiscordREST/Generated.d.ts.map +0 -1
  142. package/DiscordREST/Generated.js +0 -2405
  143. package/DiscordREST/Generated.js.map +0 -1
  144. package/DiscordREST/utils.d.ts +0 -14
  145. package/DiscordREST/utils.d.ts.map +0 -1
  146. package/DiscordREST/utils.js +0 -31
  147. package/DiscordREST/utils.js.map +0 -1
  148. package/DiscordREST.d.ts +0 -23
  149. package/DiscordREST.d.ts.map +0 -1
  150. package/DiscordREST.js +0 -132
  151. package/DiscordREST.js.map +0 -1
  152. package/Helpers/flags.d.ts +0 -28
  153. package/Helpers/flags.d.ts.map +0 -1
  154. package/Helpers/flags.js +0 -48
  155. package/Helpers/flags.js.map +0 -1
  156. package/Helpers/intents.d.ts +0 -25
  157. package/Helpers/intents.d.ts.map +0 -1
  158. package/Helpers/intents.js +0 -34
  159. package/Helpers/intents.js.map +0 -1
  160. package/Helpers/interactions.d.ts +0 -116
  161. package/Helpers/interactions.d.ts.map +0 -1
  162. package/Helpers/interactions.js +0 -143
  163. package/Helpers/interactions.js.map +0 -1
  164. package/Helpers/members.d.ts +0 -10
  165. package/Helpers/members.d.ts.map +0 -1
  166. package/Helpers/members.js +0 -17
  167. package/Helpers/members.js.map +0 -1
  168. package/Helpers/permissions.d.ts +0 -42
  169. package/Helpers/permissions.d.ts.map +0 -1
  170. package/Helpers/permissions.js +0 -97
  171. package/Helpers/permissions.js.map +0 -1
  172. package/Helpers/ui.d.ts +0 -105
  173. package/Helpers/ui.d.ts.map +0 -1
  174. package/Helpers/ui.js +0 -162
  175. package/Helpers/ui.js.map +0 -1
  176. package/Interactions/builder.d.ts +0 -48
  177. package/Interactions/builder.d.ts.map +0 -1
  178. package/Interactions/builder.js +0 -64
  179. package/Interactions/builder.js.map +0 -1
  180. package/Interactions/commandHelper.d.ts +0 -99
  181. package/Interactions/commandHelper.d.ts.map +0 -1
  182. package/Interactions/commandHelper.js +0 -53
  183. package/Interactions/commandHelper.js.map +0 -1
  184. package/Interactions/context.d.ts +0 -54
  185. package/Interactions/context.d.ts.map +0 -1
  186. package/Interactions/context.js +0 -42
  187. package/Interactions/context.js.map +0 -1
  188. package/Interactions/definitions.d.ts +0 -44
  189. package/Interactions/definitions.d.ts.map +0 -1
  190. package/Interactions/definitions.js +0 -67
  191. package/Interactions/definitions.js.map +0 -1
  192. package/Interactions/error.d.ts +0 -2
  193. package/Interactions/error.d.ts.map +0 -1
  194. package/Interactions/error.js +0 -8
  195. package/Interactions/error.js.map +0 -1
  196. package/Interactions/gateway.d.ts +0 -21
  197. package/Interactions/gateway.d.ts.map +0 -1
  198. package/Interactions/gateway.js +0 -90
  199. package/Interactions/gateway.js.map +0 -1
  200. package/Interactions/handlers.d.ts +0 -15
  201. package/Interactions/handlers.d.ts.map +0 -1
  202. package/Interactions/handlers.js +0 -72
  203. package/Interactions/handlers.js.map +0 -1
  204. package/Interactions/index.d.ts +0 -16
  205. package/Interactions/index.d.ts.map +0 -1
  206. package/Interactions/index.js +0 -94
  207. package/Interactions/index.js.map +0 -1
  208. package/Interactions/utils.d.ts +0 -61
  209. package/Interactions/utils.d.ts.map +0 -1
  210. package/Interactions/utils.js +0 -35
  211. package/Interactions/utils.js.map +0 -1
  212. package/Interactions/webhook.d.ts +0 -73
  213. package/Interactions/webhook.d.ts.map +0 -1
  214. package/Interactions/webhook.js +0 -89
  215. package/Interactions/webhook.js.map +0 -1
  216. package/RateLimit/memory.d.ts +0 -3
  217. package/RateLimit/memory.d.ts.map +0 -1
  218. package/RateLimit/memory.js +0 -47
  219. package/RateLimit/memory.js.map +0 -1
  220. package/RateLimit/utils.d.ts +0 -3
  221. package/RateLimit/utils.d.ts.map +0 -1
  222. package/RateLimit/utils.js +0 -25
  223. package/RateLimit/utils.js.map +0 -1
  224. package/RateLimit.d.ts +0 -30
  225. package/RateLimit.d.ts.map +0 -1
  226. package/RateLimit.js +0 -35
  227. package/RateLimit.js.map +0 -1
  228. package/gateway.d.ts +0 -19
  229. package/gateway.d.ts.map +0 -1
  230. package/gateway.js +0 -72
  231. package/gateway.js.map +0 -1
  232. package/index.d.ts +0 -18
  233. package/index.d.ts.map +0 -1
  234. package/index.js +0 -71
  235. package/index.js.map +0 -1
  236. package/mjs/Cache/driver.mjs +0 -3
  237. package/mjs/Cache/driver.mjs.map +0 -1
  238. package/mjs/Cache/memory.mjs +0 -48
  239. package/mjs/Cache/memory.mjs.map +0 -1
  240. package/mjs/Cache/memoryTTL.mjs +0 -119
  241. package/mjs/Cache/memoryTTL.mjs.map +0 -1
  242. package/mjs/Cache/prelude.mjs +0 -131
  243. package/mjs/Cache/prelude.mjs.map +0 -1
  244. package/mjs/Cache.mjs +0 -89
  245. package/mjs/Cache.mjs.map +0 -1
  246. package/mjs/DiscordConfig.mjs +0 -32
  247. package/mjs/DiscordConfig.mjs.map +0 -1
  248. package/mjs/DiscordGateway/DiscordWS.mjs +0 -66
  249. package/mjs/DiscordGateway/DiscordWS.mjs.map +0 -1
  250. package/mjs/DiscordGateway/Messaging.mjs +0 -33
  251. package/mjs/DiscordGateway/Messaging.mjs.map +0 -1
  252. package/mjs/DiscordGateway/Shard/StateStore.mjs +0 -40
  253. package/mjs/DiscordGateway/Shard/StateStore.mjs.map +0 -1
  254. package/mjs/DiscordGateway/Shard/heartbeats.mjs +0 -20
  255. package/mjs/DiscordGateway/Shard/heartbeats.mjs.map +0 -1
  256. package/mjs/DiscordGateway/Shard/identify.mjs +0 -30
  257. package/mjs/DiscordGateway/Shard/identify.mjs.map +0 -1
  258. package/mjs/DiscordGateway/Shard/sendEvents.mjs +0 -26
  259. package/mjs/DiscordGateway/Shard/sendEvents.mjs.map +0 -1
  260. package/mjs/DiscordGateway/Shard/utils.mjs +0 -3
  261. package/mjs/DiscordGateway/Shard/utils.mjs.map +0 -1
  262. package/mjs/DiscordGateway/Shard.mjs +0 -142
  263. package/mjs/DiscordGateway/Shard.mjs.map +0 -1
  264. package/mjs/DiscordGateway/ShardStore.mjs +0 -24
  265. package/mjs/DiscordGateway/ShardStore.mjs.map +0 -1
  266. package/mjs/DiscordGateway/Sharder.mjs +0 -66
  267. package/mjs/DiscordGateway/Sharder.mjs.map +0 -1
  268. package/mjs/DiscordGateway.mjs +0 -21
  269. package/mjs/DiscordGateway.mjs.map +0 -1
  270. package/mjs/DiscordREST/Generated.mjs +0 -2396
  271. package/mjs/DiscordREST/Generated.mjs.map +0 -1
  272. package/mjs/DiscordREST/utils.mjs +0 -20
  273. package/mjs/DiscordREST/utils.mjs.map +0 -1
  274. package/mjs/DiscordREST.mjs +0 -124
  275. package/mjs/DiscordREST.mjs.map +0 -1
  276. package/mjs/Helpers/flags.mjs +0 -36
  277. package/mjs/Helpers/flags.mjs.map +0 -1
  278. package/mjs/Helpers/intents.mjs +0 -27
  279. package/mjs/Helpers/intents.mjs.map +0 -1
  280. package/mjs/Helpers/interactions.mjs +0 -115
  281. package/mjs/Helpers/interactions.mjs.map +0 -1
  282. package/mjs/Helpers/members.mjs +0 -9
  283. package/mjs/Helpers/members.mjs.map +0 -1
  284. package/mjs/Helpers/permissions.mjs +0 -84
  285. package/mjs/Helpers/permissions.mjs.map +0 -1
  286. package/mjs/Helpers/ui.mjs +0 -137
  287. package/mjs/Helpers/ui.mjs.map +0 -1
  288. package/mjs/Interactions/builder.mjs +0 -56
  289. package/mjs/Interactions/builder.mjs.map +0 -1
  290. package/mjs/Interactions/commandHelper.mjs +0 -45
  291. package/mjs/Interactions/commandHelper.mjs.map +0 -1
  292. package/mjs/Interactions/context.mjs +0 -29
  293. package/mjs/Interactions/context.mjs.map +0 -1
  294. package/mjs/Interactions/definitions.mjs +0 -51
  295. package/mjs/Interactions/definitions.mjs.map +0 -1
  296. package/mjs/Interactions/error.mjs +0 -2
  297. package/mjs/Interactions/error.mjs.map +0 -1
  298. package/mjs/Interactions/gateway.mjs +0 -81
  299. package/mjs/Interactions/gateway.mjs.map +0 -1
  300. package/mjs/Interactions/handlers.mjs +0 -63
  301. package/mjs/Interactions/handlers.mjs.map +0 -1
  302. package/mjs/Interactions/index.mjs +0 -11
  303. package/mjs/Interactions/index.mjs.map +0 -1
  304. package/mjs/Interactions/utils.mjs +0 -26
  305. package/mjs/Interactions/utils.mjs.map +0 -1
  306. package/mjs/Interactions/webhook.mjs +0 -76
  307. package/mjs/Interactions/webhook.mjs.map +0 -1
  308. package/mjs/RateLimit/memory.mjs +0 -39
  309. package/mjs/RateLimit/memory.mjs.map +0 -1
  310. package/mjs/RateLimit/utils.mjs +0 -18
  311. package/mjs/RateLimit/utils.mjs.map +0 -1
  312. package/mjs/RateLimit.mjs +0 -28
  313. package/mjs/RateLimit.mjs.map +0 -1
  314. package/mjs/gateway.mjs +0 -19
  315. package/mjs/gateway.mjs.map +0 -1
  316. package/mjs/index.mjs +0 -18
  317. package/mjs/index.mjs.map +0 -1
  318. package/mjs/types.mjs +0 -356
  319. package/mjs/types.mjs.map +0 -1
  320. package/mjs/utils/Effect.mjs +0 -18
  321. package/mjs/utils/Effect.mjs.map +0 -1
  322. package/mjs/version.mjs +0 -2
  323. package/mjs/version.mjs.map +0 -1
  324. package/mjs/webhooks.mjs +0 -6
  325. package/mjs/webhooks.mjs.map +0 -1
  326. package/src/version.ts +0 -1
  327. package/types.d.ts +0 -2457
  328. package/types.d.ts.map +0 -1
  329. package/types.js +0 -408
  330. package/types.js.map +0 -1
  331. package/utils/Effect.d.ts +0 -5
  332. package/utils/Effect.d.ts.map +0 -1
  333. package/utils/Effect.js +0 -27
  334. package/utils/Effect.js.map +0 -1
  335. package/version.d.ts +0 -2
  336. package/version.d.ts.map +0 -1
  337. package/version.js +0 -8
  338. package/version.js.map +0 -1
  339. package/webhooks.d.ts +0 -8
  340. package/webhooks.d.ts.map +0 -1
  341. package/webhooks.js +0 -55
  342. package/webhooks.js.map +0 -1
@@ -1,2396 +0,0 @@
1
- import * as HttpClientError from "@effect/platform/HttpClientError";
2
- import * as HttpClientRequest from "@effect/platform/HttpClientRequest";
3
- import * as HttpClientResponse from "@effect/platform/HttpClientResponse";
4
- import * as Data from "effect/Data";
5
- import * as Effect from "effect/Effect";
6
- export const OAuth2Scopes = {
7
- /**
8
- * allows /users/@me without email
9
- */
10
- IDENTIFY: "identify",
11
- /**
12
- * enables /users/@me to return an email
13
- */
14
- EMAIL: "email",
15
- /**
16
- * allows /users/@me/connections to return linked third-party accounts
17
- */
18
- CONNECTIONS: "connections",
19
- /**
20
- * allows /users/@me/guilds to return basic information about all of a user's guilds
21
- */
22
- GUILDS: "guilds",
23
- /**
24
- * allows /guilds/{guild.id}/members/{user.id} to be used for joining users to a guild
25
- */
26
- GUILDS_JOIN: "guilds.join",
27
- /**
28
- * allows /users/@me/guilds/{guild.id}/member to return a user's member information in a guild
29
- */
30
- GUILDS_MEMBERS_READ: "guilds.members.read",
31
- /**
32
- * allows your app to join users to a group dm
33
- */
34
- GDM_JOIN: "gdm.join",
35
- /**
36
- * for oauth2 bots, this puts the bot in the user's selected guild by default
37
- */
38
- BOT: "bot",
39
- /**
40
- * for local rpc server access, this allows you to control a user's local Discord client - requires Discord approval
41
- */
42
- RPC: "rpc",
43
- /**
44
- * for local rpc server access, this allows you to receive notifications pushed out to the user - requires Discord approval
45
- */
46
- RPC_NOTIFICATIONS_READ: "rpc.notifications.read",
47
- /**
48
- * for local rpc server access, this allows you to read a user's voice settings and listen for voice events - requires Discord approval
49
- */
50
- RPC_VOICE_READ: "rpc.voice.read",
51
- /**
52
- * for local rpc server access, this allows you to update a user's voice settings - requires Discord approval
53
- */
54
- RPC_VOICE_WRITE: "rpc.voice.write",
55
- /**
56
- * for local rpc server access, this allows you to read a user's video status - requires Discord approval
57
- */
58
- RPC_VIDEO_READ: "rpc.video.read",
59
- /**
60
- * for local rpc server access, this allows you to update a user's video settings - requires Discord approval
61
- */
62
- RPC_VIDEO_WRITE: "rpc.video.write",
63
- /**
64
- * for local rpc server access, this allows you to read a user's screenshare status- requires Discord approval
65
- */
66
- RPC_SCREENSHARE_READ: "rpc.screenshare.read",
67
- /**
68
- * for local rpc server access, this allows you to update a user's screenshare settings- requires Discord approval
69
- */
70
- RPC_SCREENSHARE_WRITE: "rpc.screenshare.write",
71
- /**
72
- * for local rpc server access, this allows you to update a user's activity - requires Discord approval
73
- */
74
- RPC_ACTIVITIES_WRITE: "rpc.activities.write",
75
- /**
76
- * this generates a webhook that is returned in the oauth token response for authorization code grants
77
- */
78
- WEBHOOK_INCOMING: "webhook.incoming",
79
- /**
80
- * for local rpc server api access, this allows you to read messages from all client channels (otherwise restricted to channels/guilds your app creates)
81
- */
82
- MESSAGES_READ: "messages.read",
83
- /**
84
- * allows your app to upload/update builds for a user's applications - requires Discord approval
85
- */
86
- APPLICATIONS_BUILDS_UPLOAD: "applications.builds.upload",
87
- /**
88
- * allows your app to read build data for a user's applications
89
- */
90
- APPLICATIONS_BUILDS_READ: "applications.builds.read",
91
- /**
92
- * allows your app to use commands in a guild
93
- */
94
- APPLICATIONS_COMMANDS: "applications.commands",
95
- /**
96
- * allows your app to update permissions for its commands in a guild a user has permissions to
97
- */
98
- APPLICATIONS_COMMANDS_PERMISSIONS_UPDATE: "applications.commands.permissions.update",
99
- /**
100
- * allows your app to update its commands using a Bearer token - client credentials grant only
101
- */
102
- APPLICATIONS_COMMANDS_UPDATE: "applications.commands.update",
103
- /**
104
- * allows your app to read and update store data (SKUs, store listings, achievements, etc.) for a user's applications
105
- */
106
- APPLICATIONS_STORE_UPDATE: "applications.store.update",
107
- /**
108
- * allows your app to read entitlements for a user's applications
109
- */
110
- APPLICATIONS_ENTITLEMENTS: "applications.entitlements",
111
- /**
112
- * allows your app to fetch data from a user's "Now Playing/Recently Played" list - requires Discord approval
113
- */
114
- ACTIVITIES_READ: "activities.read",
115
- /**
116
- * allows your app to update a user's activity - requires Discord approval (NOT REQUIRED FOR GAMESDK ACTIVITY MANAGER)
117
- */
118
- ACTIVITIES_WRITE: "activities.write",
119
- /**
120
- * allows your app to send activity invites - requires Discord approval (NOT REQUIRED FOR GAMESDK ACTIVITY MANAGER)
121
- */
122
- ACTIVITIES_INVITES_WRITE: "activities.invites.write",
123
- /**
124
- * allows your app to know a user's friends and implicit relationships - requires Discord approval
125
- */
126
- RELATIONSHIPS_READ: "relationships.read",
127
- /**
128
- * allows your app to connect to voice on user's behalf and see all the voice members - requires Discord approval
129
- */
130
- VOICE: "voice",
131
- /**
132
- * allows your app to see information about the user's DMs and group DMs - requires Discord approval
133
- */
134
- DM_CHANNELS_READ: "dm_channels.read",
135
- /**
136
- * allows your app to update a user's connection and metadata for the app
137
- */
138
- ROLE_CONNECTIONS_WRITE: "role_connections.write",
139
- /**
140
- * for OpenID Connect, this allows your app to receive user id and basic profile information
141
- */
142
- OPENID: "openid"
143
- };
144
- export const ApplicationExplicitContentFilterTypes = {
145
- /**
146
- * inherit guild content filter setting
147
- */
148
- INHERIT: 0,
149
- /**
150
- * interactions will always be scanned
151
- */
152
- ALWAYS: 1
153
- };
154
- export const TeamMembershipStates = {
155
- /**
156
- * User has been invited to the team.
157
- */
158
- INVITED: 1,
159
- /**
160
- * User has accepted the team invitation.
161
- */
162
- ACCEPTED: 2
163
- };
164
- export const EmbeddedActivityLocationKind = {
165
- /**
166
- * guild channel
167
- */
168
- GUILD_CHANNEL: "gc",
169
- /**
170
- * private channel
171
- */
172
- PRIVATE_CHANNEL: "pc"
173
- };
174
- export const ApplicationCommandType = {
175
- /**
176
- * Slash commands; a text-based command that shows up when a user types /
177
- */
178
- CHAT: 1,
179
- /**
180
- * A UI-based command that shows up when you right click or tap on a user
181
- */
182
- USER: 2,
183
- /**
184
- * A UI-based command that shows up when you right click or tap on a message
185
- */
186
- MESSAGE: 3,
187
- /**
188
- * A command that represents the primary way to use an application (e.g. launching an Activity)
189
- */
190
- PRIMARY_ENTRY_POINT: 4
191
- };
192
- export const InteractionContextType = {
193
- /**
194
- * This command can be used within a Guild.
195
- */
196
- GUILD: 0,
197
- /**
198
- * This command can be used within a DM with this application's bot.
199
- */
200
- BOT_DM: 1,
201
- /**
202
- * This command can be used within DMs and Group DMs with users.
203
- */
204
- PRIVATE_CHANNEL: 2
205
- };
206
- export const ApplicationIntegrationType = {
207
- /**
208
- * For Guild install.
209
- */
210
- GUILD_INSTALL: 0,
211
- /**
212
- * For User install.
213
- */
214
- USER_INSTALL: 1
215
- };
216
- export const ApplicationCommandOptionType = {
217
- /**
218
- * A sub-action within a command or group
219
- */
220
- SUB_COMMAND: 1,
221
- /**
222
- * A group of subcommands
223
- */
224
- SUB_COMMAND_GROUP: 2,
225
- /**
226
- * A string option
227
- */
228
- STRING: 3,
229
- /**
230
- * An integer option. Any integer between -2^53 and 2^53 is a valid value
231
- */
232
- INTEGER: 4,
233
- /**
234
- * A boolean option
235
- */
236
- BOOLEAN: 5,
237
- /**
238
- * A snowflake option that represents a User
239
- */
240
- USER: 6,
241
- /**
242
- * A snowflake option that represents a Channel. Includes all channel types and categories
243
- */
244
- CHANNEL: 7,
245
- /**
246
- * A snowflake option that represents a Role
247
- */
248
- ROLE: 8,
249
- /**
250
- * A snowflake option that represents anything you can mention
251
- */
252
- MENTIONABLE: 9,
253
- /**
254
- * A number option. Any double between -2^53 and 2^53 is a valid value
255
- */
256
- NUMBER: 10,
257
- /**
258
- * An attachment option
259
- */
260
- ATTACHMENT: 11
261
- };
262
- export const ChannelTypes = {
263
- /**
264
- * A direct message between users
265
- */
266
- DM: 1,
267
- /**
268
- * A direct message between multiple users
269
- */
270
- GROUP_DM: 3,
271
- /**
272
- * A text channel within a server
273
- */
274
- GUILD_TEXT: 0,
275
- /**
276
- * A voice channel within a server
277
- */
278
- GUILD_VOICE: 2,
279
- /**
280
- * An organizational category that contains up to 50 channels
281
- */
282
- GUILD_CATEGORY: 4,
283
- /**
284
- * A channel that users can follow and crosspost into their own server (formerly news channels)
285
- */
286
- GUILD_ANNOUNCEMENT: 5,
287
- /**
288
- * A temporary sub-channel within a GUILD_ANNOUNCEMENT channel
289
- */
290
- ANNOUNCEMENT_THREAD: 10,
291
- /**
292
- * A temporary sub-channel within a GUILD_TEXT or GUILD_THREADS_ONLY channel type set
293
- */
294
- PUBLIC_THREAD: 11,
295
- /**
296
- * A temporary sub-channel within a GUILD_TEXT channel that is only viewable by those invited and those with the MANAGE_THREADS permission
297
- */
298
- PRIVATE_THREAD: 12,
299
- /**
300
- * A voice channel for hosting events with an audience
301
- */
302
- GUILD_STAGE_VOICE: 13,
303
- /**
304
- * The channel in a hub containing the listed servers
305
- */
306
- GUILD_DIRECTORY: 14,
307
- /**
308
- * Channel that can only contain threads
309
- */
310
- GUILD_FORUM: 15
311
- };
312
- export const EntitlementTypes = {
313
- APPLICATION_SUBSCRIPTION: 8,
314
- QUEST_REWARD: 10
315
- };
316
- export const EntitlementTenantFulfillmentStatusResponse = {
317
- UNKNOWN: 0,
318
- FULFILLMENT_NOT_NEEDED: 1,
319
- FULFILLMENT_NEEDED: 2,
320
- FULFILLED: 3,
321
- FULFILLMENT_FAILED: 4,
322
- UNFULFILLMENT_NEEDED: 5,
323
- UNFULFILLED: 6,
324
- UNFULFILLMENT_FAILED: 7
325
- };
326
- export const ApplicationCommandPermissionType = {
327
- /**
328
- * This permission is for a role.
329
- */
330
- ROLE: 1,
331
- /**
332
- * This permission is for a user.
333
- */
334
- USER: 2,
335
- /**
336
- * This permission is for a channel.
337
- */
338
- CHANNEL: 3
339
- };
340
- export const MetadataItemTypes = {
341
- /**
342
- * the metadata value (integer) is less than or equal to the guild's configured value (integer)
343
- */
344
- INTEGER_LESS_THAN_EQUAL: 1,
345
- /**
346
- * the metadata value (integer) is greater than or equal to the guild's configured value (integer)
347
- */
348
- INTEGER_GREATER_THAN_EQUAL: 2,
349
- /**
350
- * the metadata value (integer) is equal to the guild's configured value (integer)
351
- */
352
- INTEGER_EQUAL: 3,
353
- /**
354
- * the metadata value (integer) is not equal to the guild's configured value (integer)
355
- */
356
- INTEGER_NOT_EQUAL: 4,
357
- /**
358
- * the metadata value (ISO8601 string) is less than or equal to the guild's configured value (integer; days before current date)
359
- */
360
- DATETIME_LESS_THAN_EQUAL: 5,
361
- /**
362
- * the metadata value (ISO8601 string) is greater than or equal to the guild's configured value (integer; days before current date)
363
- */
364
- DATETIME_GREATER_THAN_EQUAL: 6,
365
- /**
366
- * the metadata value (integer) is equal to the guild's configured value (integer; 1)
367
- */
368
- BOOLEAN_EQUAL: 7,
369
- /**
370
- * the metadata value (integer) is not equal to the guild's configured value (integer; 1)
371
- */
372
- BOOLEAN_NOT_EQUAL: 8
373
- };
374
- export const VideoQualityModes = {
375
- /**
376
- * Discord chooses the quality for optimal performance
377
- */
378
- AUTO: 1,
379
- /**
380
- * 720p
381
- */
382
- FULL: 2
383
- };
384
- export const ThreadAutoArchiveDuration = {
385
- /**
386
- * One hour
387
- */
388
- ONE_HOUR: 60,
389
- /**
390
- * One day
391
- */
392
- ONE_DAY: 1440,
393
- /**
394
- * Three days
395
- */
396
- THREE_DAY: 4320,
397
- /**
398
- * Seven days
399
- */
400
- SEVEN_DAY: 10080
401
- };
402
- export const ChannelPermissionOverwrites = {
403
- ROLE: 0,
404
- MEMBER: 1
405
- };
406
- export const ThreadSortOrder = {
407
- /**
408
- * Sort forum posts by activity
409
- */
410
- LATEST_ACTIVITY: 0,
411
- /**
412
- * Sort forum posts by creation time (from most recent to oldest)
413
- */
414
- CREATION_DATE: 1
415
- };
416
- export const ForumLayout = {
417
- /**
418
- * No default has been set for forum channel
419
- */
420
- DEFAULT: 0,
421
- /**
422
- * Display posts as a list
423
- */
424
- LIST: 1,
425
- /**
426
- * Display posts as a collection of tiles
427
- */
428
- GRID: 2
429
- };
430
- export const ThreadSearchTagSetting = {
431
- /**
432
- * The thread tags must contain all tags in the search query
433
- */
434
- MATCH_ALL: "match_all",
435
- /**
436
- * The thread tags must contain at least one of tags in the search query
437
- */
438
- MATCH_SOME: "match_some"
439
- };
440
- export const InviteTypes = {
441
- GUILD: 0,
442
- GROUP_DM: 1,
443
- FRIEND: 2
444
- };
445
- export const GuildFeatures = {
446
- /**
447
- * guild has access to set an animated guild banner image
448
- */
449
- ANIMATED_BANNER: "ANIMATED_BANNER",
450
- /**
451
- * guild has access to set an animated guild icon
452
- */
453
- ANIMATED_ICON: "ANIMATED_ICON",
454
- /**
455
- * guild is using the old permissions configuration behavior
456
- */
457
- APPLICATION_COMMAND_PERMISSIONS_V2: "APPLICATION_COMMAND_PERMISSIONS_V2",
458
- /**
459
- * guild has set up auto moderation rules
460
- */
461
- AUTO_MODERATION: "AUTO_MODERATION",
462
- /**
463
- * guild has access to set a guild banner image
464
- */
465
- BANNER: "BANNER",
466
- /**
467
- * guild can enable welcome screen, Membership Screening, stage channels and discovery, and receives community updates
468
- */
469
- COMMUNITY: "COMMUNITY",
470
- /**
471
- * guild has enabled monetization
472
- */
473
- CREATOR_MONETIZABLE_PROVISIONAL: "CREATOR_MONETIZABLE_PROVISIONAL",
474
- /**
475
- * guild has enabled the role subscription promo page
476
- */
477
- CREATOR_STORE_PAGE: "CREATOR_STORE_PAGE",
478
- /**
479
- * guild has been set as a support server on the App Directory
480
- */
481
- DEVELOPER_SUPPORT_SERVER: "DEVELOPER_SUPPORT_SERVER",
482
- /**
483
- * guild is able to be discovered in the directory
484
- */
485
- DISCOVERABLE: "DISCOVERABLE",
486
- /**
487
- * guild is able to be featured in the directory
488
- */
489
- FEATURABLE: "FEATURABLE",
490
- /**
491
- * guild has paused invites, preventing new users from joining
492
- */
493
- INVITES_DISABLED: "INVITES_DISABLED",
494
- /**
495
- * guild has access to set an invite splash background
496
- */
497
- INVITE_SPLASH: "INVITE_SPLASH",
498
- /**
499
- * guild has enabled Membership Screening
500
- */
501
- MEMBER_VERIFICATION_GATE_ENABLED: "MEMBER_VERIFICATION_GATE_ENABLED",
502
- /**
503
- * guild has increased custom sticker slots
504
- */
505
- MORE_STICKERS: "MORE_STICKERS",
506
- /**
507
- * guild has access to create announcement channels
508
- */
509
- NEWS: "NEWS",
510
- /**
511
- * guild is partnered
512
- */
513
- PARTNERED: "PARTNERED",
514
- /**
515
- * guild can be previewed before joining via Membership Screening or the directory
516
- */
517
- PREVIEW_ENABLED: "PREVIEW_ENABLED",
518
- /**
519
- * guild has disabled activity alerts in the configured safety alerts channel
520
- */
521
- RAID_ALERTS_DISABLED: "RAID_ALERTS_DISABLED",
522
- /**
523
- * guild is able to set role icons
524
- */
525
- ROLE_ICONS: "ROLE_ICONS",
526
- /**
527
- * guild has role subscriptions that can be purchased
528
- */
529
- ROLE_SUBSCRIPTIONS_AVAILABLE_FOR_PURCHASE: "ROLE_SUBSCRIPTIONS_AVAILABLE_FOR_PURCHASE",
530
- /**
531
- * guild has enabled role subscriptions
532
- */
533
- ROLE_SUBSCRIPTIONS_ENABLED: "ROLE_SUBSCRIPTIONS_ENABLED",
534
- /**
535
- * guild has enabled ticketed events
536
- */
537
- TICKETED_EVENTS_ENABLED: "TICKETED_EVENTS_ENABLED",
538
- /**
539
- * guild has access to set a vanity URL
540
- */
541
- VANITY_URL: "VANITY_URL",
542
- /**
543
- * guild is verified
544
- */
545
- VERIFIED: "VERIFIED",
546
- /**
547
- * guild has access to set 384kbps bitrate in voice (previously VIP voice servers)
548
- */
549
- VIP_REGIONS: "VIP_REGIONS",
550
- /**
551
- * guild has enabled the welcome screen
552
- */
553
- WELCOME_SCREEN_ENABLED: "WELCOME_SCREEN_ENABLED"
554
- };
555
- export const VerificationLevels = {
556
- /**
557
- * unrestricted
558
- */
559
- NONE: 0,
560
- /**
561
- * must have verified email on account
562
- */
563
- LOW: 1,
564
- /**
565
- * must be registered on Discord for longer than 5 minutes
566
- */
567
- MEDIUM: 2,
568
- /**
569
- * must be a member of the server for longer than 10 minutes
570
- */
571
- HIGH: 3,
572
- /**
573
- * must have a verified phone number
574
- */
575
- VERY_HIGH: 4
576
- };
577
- export const GuildNSFWContentLevel = {
578
- DEFAULT: 0,
579
- EXPLICIT: 1,
580
- SAFE: 2,
581
- AGE_RESTRICTED: 3
582
- };
583
- export const InviteTargetTypes = {
584
- STREAM: 1,
585
- EMBEDDED_APPLICATION: 2,
586
- ROLE_SUBSCRIPTIONS_PURCHASE: 3
587
- };
588
- export const GuildScheduledEventStatuses = {
589
- SCHEDULED: 1,
590
- ACTIVE: 2,
591
- COMPLETED: 3,
592
- CANCELED: 4
593
- };
594
- export const GuildScheduledEventEntityTypes = {
595
- NONE: 0,
596
- STAGE_INSTANCE: 1,
597
- VOICE: 2,
598
- EXTERNAL: 3
599
- };
600
- export const MessageType = {
601
- DEFAULT: 0,
602
- RECIPIENT_ADD: 1,
603
- RECIPIENT_REMOVE: 2,
604
- CALL: 3,
605
- CHANNEL_NAME_CHANGE: 4,
606
- CHANNEL_ICON_CHANGE: 5,
607
- CHANNEL_PINNED_MESSAGE: 6,
608
- USER_JOIN: 7,
609
- GUILD_BOOST: 8,
610
- GUILD_BOOST_TIER_1: 9,
611
- GUILD_BOOST_TIER_2: 10,
612
- GUILD_BOOST_TIER_3: 11,
613
- CHANNEL_FOLLOW_ADD: 12,
614
- GUILD_DISCOVERY_DISQUALIFIED: 14,
615
- GUILD_DISCOVERY_REQUALIFIED: 15,
616
- GUILD_DISCOVERY_GRACE_PERIOD_INITIAL_WARNING: 16,
617
- GUILD_DISCOVERY_GRACE_PERIOD_FINAL_WARNING: 17,
618
- THREAD_CREATED: 18,
619
- REPLY: 19,
620
- CHAT_INPUT_COMMAND: 20,
621
- THREAD_STARTER_MESSAGE: 21,
622
- GUILD_INVITE_REMINDER: 22,
623
- CONTEXT_MENU_COMMAND: 23,
624
- AUTO_MODERATION_ACTION: 24,
625
- ROLE_SUBSCRIPTION_PURCHASE: 25,
626
- INTERACTION_PREMIUM_UPSELL: 26,
627
- STAGE_START: 27,
628
- STAGE_END: 28,
629
- STAGE_SPEAKER: 29,
630
- STAGE_TOPIC: 31,
631
- GUILD_APPLICATION_PREMIUM_SUBSCRIPTION: 32,
632
- GUILD_INCIDENT_ALERT_MODE_ENABLED: 36,
633
- GUILD_INCIDENT_ALERT_MODE_DISABLED: 37,
634
- GUILD_INCIDENT_REPORT_RAID: 38,
635
- GUILD_INCIDENT_REPORT_FALSE_ALARM: 39,
636
- POLL_RESULT: 46,
637
- HD_STREAMING_UPGRADED: 55
638
- };
639
- export const MessageComponentTypes = {
640
- /**
641
- * Container for other components
642
- */
643
- ACTION_ROW: 1,
644
- /**
645
- * Button object
646
- */
647
- BUTTON: 2,
648
- /**
649
- * Select menu for picking from defined text options
650
- */
651
- STRING_SELECT: 3,
652
- /**
653
- * Text input object
654
- */
655
- TEXT_INPUT: 4,
656
- /**
657
- * Select menu for users
658
- */
659
- USER_SELECT: 5,
660
- /**
661
- * Select menu for roles
662
- */
663
- ROLE_SELECT: 6,
664
- /**
665
- * Select menu for mentionables (users and roles)
666
- */
667
- MENTIONABLE_SELECT: 7,
668
- /**
669
- * Select menu for channels
670
- */
671
- CHANNEL_SELECT: 8,
672
- /**
673
- * Section component
674
- */
675
- SECTION: 9,
676
- /**
677
- * Text component
678
- */
679
- TEXT_DISPLAY: 10,
680
- /**
681
- * Thumbnail component
682
- */
683
- THUMBNAIL: 11,
684
- /**
685
- * Media gallery component
686
- */
687
- MEDIA_GALLERY: 12,
688
- /**
689
- * File component
690
- */
691
- FILE: 13,
692
- /**
693
- * Separator component
694
- */
695
- SEPARATOR: 14,
696
- /**
697
- * Container component
698
- */
699
- CONTAINER: 17,
700
- /**
701
- * Label component
702
- */
703
- LABEL: 18
704
- };
705
- export const ButtonStyleTypes = {
706
- PRIMARY: 1,
707
- SECONDARY: 2,
708
- SUCCESS: 3,
709
- DANGER: 4,
710
- LINK: 5,
711
- PREMIUM: 6
712
- };
713
- export const SnowflakeSelectDefaultValueTypes = {
714
- USER: "user",
715
- ROLE: "role",
716
- CHANNEL: "channel"
717
- };
718
- export const TextInputStyleTypes = {
719
- /**
720
- * Single-line input
721
- */
722
- SHORT: 1,
723
- /**
724
- * Multi-line input
725
- */
726
- PARAGRAPH: 2
727
- };
728
- export const MessageComponentSeparatorSpacingSize = {
729
- /**
730
- * Small spacing
731
- */
732
- SMALL: 1,
733
- /**
734
- * Large spacing
735
- */
736
- LARGE: 2
737
- };
738
- export const StickerTypes = {
739
- /**
740
- * an official sticker in a pack, part of Nitro or in a removed purchasable pack
741
- */
742
- STANDARD: 1,
743
- /**
744
- * a sticker uploaded to a guild for the guild's members
745
- */
746
- GUILD: 2
747
- };
748
- export const StickerFormatTypes = {
749
- PNG: 1,
750
- APNG: 2,
751
- LOTTIE: 3,
752
- GIF: 4
753
- };
754
- export const InteractionTypes = {
755
- /**
756
- * Sent by Discord to validate your application's interaction handler
757
- */
758
- PING: 1,
759
- /**
760
- * Sent when a user uses an application command
761
- */
762
- APPLICATION_COMMAND: 2,
763
- /**
764
- * Sent when a user interacts with a message component previously sent by your application
765
- */
766
- MESSAGE_COMPONENT: 3,
767
- /**
768
- * Sent when a user is filling in an autocomplete option in a chat command
769
- */
770
- APPLICATION_COMMAND_AUTOCOMPLETE: 4,
771
- /**
772
- * Sent when a user submits a modal previously sent by your application
773
- */
774
- MODAL_SUBMIT: 5
775
- };
776
- export const MessageShareCustomUserThemeBaseTheme = {
777
- /**
778
- * No base theme
779
- */
780
- UNSET: 0,
781
- /**
782
- * Dark base theme
783
- */
784
- DARK: 1,
785
- /**
786
- * Light base theme
787
- */
788
- LIGHT: 2,
789
- /**
790
- * Darker base theme
791
- */
792
- DARKER: 3,
793
- /**
794
- * Midnight base theme
795
- */
796
- MIDNIGHT: 4
797
- };
798
- export const AllowedMentionTypes = {
799
- /**
800
- * Controls role mentions
801
- */
802
- USERS: "users",
803
- /**
804
- * Controls user mentions
805
- */
806
- ROLES: "roles",
807
- /**
808
- * Controls @everyone and @here mentions
809
- */
810
- EVERYONE: "everyone"
811
- };
812
- export const ReactionTypes = {
813
- /**
814
- * Normal reaction type
815
- */
816
- NORMAL: 0,
817
- /**
818
- * Burst reaction type
819
- */
820
- BURST: 1
821
- };
822
- export const ThreadSortingMode = {
823
- RELEVANCE: "relevance",
824
- CREATION_TIME: "creation_time",
825
- LAST_MESSAGE_TIME: "last_message_time",
826
- ARCHIVE_TIME: "archive_time"
827
- };
828
- export const SortingOrder = {
829
- ASC: "asc",
830
- DESC: "desc"
831
- };
832
- export const WebhookTypes = {
833
- /**
834
- * Incoming Webhooks can post messages to channels with a generated token
835
- */
836
- GUILD_INCOMING: 1,
837
- /**
838
- * Channel Follower Webhooks are internal webhooks used with Channel Following to post new messages into channels
839
- */
840
- CHANNEL_FOLLOWER: 2,
841
- /**
842
- * Application webhooks are webhooks used with Interactions
843
- */
844
- APPLICATION_INCOMING: 3
845
- };
846
- export const UserNotificationSettings = {
847
- /**
848
- * members will receive notifications for all messages by default
849
- */
850
- ALL_MESSAGES: 0,
851
- /**
852
- * members will receive notifications only for messages that @mention them by default
853
- */
854
- ONLY_MENTIONS: 1
855
- };
856
- export const GuildExplicitContentFilterTypes = {
857
- /**
858
- * media content will not be scanned
859
- */
860
- DISABLED: 0,
861
- /**
862
- * media content sent by members without roles will be scanned
863
- */
864
- MEMBERS_WITHOUT_ROLES: 1,
865
- /**
866
- * media content sent by all members will be scanned
867
- */
868
- ALL_MEMBERS: 2
869
- };
870
- export const AvailableLocalesEnum = {
871
- /**
872
- * The ar locale
873
- */
874
- ar: "ar",
875
- /**
876
- * The bg locale
877
- */
878
- bg: "bg",
879
- /**
880
- * The cs locale
881
- */
882
- cs: "cs",
883
- /**
884
- * The da locale
885
- */
886
- da: "da",
887
- /**
888
- * The de locale
889
- */
890
- de: "de",
891
- /**
892
- * The el locale
893
- */
894
- el: "el",
895
- /**
896
- * The en-GB locale
897
- */
898
- "en-GB": "en-GB",
899
- /**
900
- * The en-US locale
901
- */
902
- "en-US": "en-US",
903
- /**
904
- * The es-419 locale
905
- */
906
- "es-419": "es-419",
907
- /**
908
- * The es-ES locale
909
- */
910
- "es-ES": "es-ES",
911
- /**
912
- * The fi locale
913
- */
914
- fi: "fi",
915
- /**
916
- * The fr locale
917
- */
918
- fr: "fr",
919
- /**
920
- * The he locale
921
- */
922
- he: "he",
923
- /**
924
- * The hi locale
925
- */
926
- hi: "hi",
927
- /**
928
- * The hr locale
929
- */
930
- hr: "hr",
931
- /**
932
- * The hu locale
933
- */
934
- hu: "hu",
935
- /**
936
- * The id locale
937
- */
938
- id: "id",
939
- /**
940
- * The it locale
941
- */
942
- it: "it",
943
- /**
944
- * The ja locale
945
- */
946
- ja: "ja",
947
- /**
948
- * The ko locale
949
- */
950
- ko: "ko",
951
- /**
952
- * The lt locale
953
- */
954
- lt: "lt",
955
- /**
956
- * The nl locale
957
- */
958
- nl: "nl",
959
- /**
960
- * The no locale
961
- */
962
- no: "no",
963
- /**
964
- * The pl locale
965
- */
966
- pl: "pl",
967
- /**
968
- * The pt-BR locale
969
- */
970
- "pt-BR": "pt-BR",
971
- /**
972
- * The ro locale
973
- */
974
- ro: "ro",
975
- /**
976
- * The ru locale
977
- */
978
- ru: "ru",
979
- /**
980
- * The sv-SE locale
981
- */
982
- "sv-SE": "sv-SE",
983
- /**
984
- * The th locale
985
- */
986
- th: "th",
987
- /**
988
- * The tr locale
989
- */
990
- tr: "tr",
991
- /**
992
- * The uk locale
993
- */
994
- uk: "uk",
995
- /**
996
- * The vi locale
997
- */
998
- vi: "vi",
999
- /**
1000
- * The zh-CN locale
1001
- */
1002
- "zh-CN": "zh-CN",
1003
- /**
1004
- * The zh-TW locale
1005
- */
1006
- "zh-TW": "zh-TW"
1007
- };
1008
- export const AfkTimeouts = {
1009
- ONE_MINUTE: 60,
1010
- FIVE_MINUTES: 300,
1011
- FIFTEEN_MINUTES: 900,
1012
- THIRTY_MINUTES: 1800,
1013
- ONE_HOUR: 3600
1014
- };
1015
- export const GuildMFALevel = {
1016
- /**
1017
- * Guild has no MFA/2FA requirement for moderation actions
1018
- */
1019
- NONE: 0,
1020
- /**
1021
- * Guild has a 2FA requirement for moderation actions
1022
- */
1023
- ELEVATED: 1
1024
- };
1025
- export const PremiumGuildTiers = {
1026
- /**
1027
- * Guild has not unlocked any Server Boost perks
1028
- */
1029
- NONE: 0,
1030
- /**
1031
- * Guild has unlocked Server Boost level 1 perks
1032
- */
1033
- TIER_1: 1,
1034
- /**
1035
- * Guild has unlocked Server Boost level 2 perks
1036
- */
1037
- TIER_2: 2,
1038
- /**
1039
- * Guild has unlocked Server Boost level 3 perks
1040
- */
1041
- TIER_3: 3
1042
- };
1043
- export const AuditLogActionTypes = {
1044
- GUILD_UPDATE: 1,
1045
- CHANNEL_CREATE: 10,
1046
- CHANNEL_UPDATE: 11,
1047
- CHANNEL_DELETE: 12,
1048
- CHANNEL_OVERWRITE_CREATE: 13,
1049
- CHANNEL_OVERWRITE_UPDATE: 14,
1050
- CHANNEL_OVERWRITE_DELETE: 15,
1051
- MEMBER_KICK: 20,
1052
- MEMBER_PRUNE: 21,
1053
- MEMBER_BAN_ADD: 22,
1054
- MEMBER_BAN_REMOVE: 23,
1055
- MEMBER_UPDATE: 24,
1056
- MEMBER_ROLE_UPDATE: 25,
1057
- MEMBER_MOVE: 26,
1058
- MEMBER_DISCONNECT: 27,
1059
- BOT_ADD: 28,
1060
- ROLE_CREATE: 30,
1061
- ROLE_UPDATE: 31,
1062
- ROLE_DELETE: 32,
1063
- INVITE_CREATE: 40,
1064
- INVITE_UPDATE: 41,
1065
- INVITE_DELETE: 42,
1066
- WEBHOOK_CREATE: 50,
1067
- WEBHOOK_UPDATE: 51,
1068
- WEBHOOK_DELETE: 52,
1069
- EMOJI_CREATE: 60,
1070
- EMOJI_UPDATE: 61,
1071
- EMOJI_DELETE: 62,
1072
- MESSAGE_DELETE: 72,
1073
- MESSAGE_BULK_DELETE: 73,
1074
- MESSAGE_PIN: 74,
1075
- MESSAGE_UNPIN: 75,
1076
- INTEGRATION_CREATE: 80,
1077
- INTEGRATION_UPDATE: 81,
1078
- INTEGRATION_DELETE: 82,
1079
- STAGE_INSTANCE_CREATE: 83,
1080
- STAGE_INSTANCE_UPDATE: 84,
1081
- STAGE_INSTANCE_DELETE: 85,
1082
- STICKER_CREATE: 90,
1083
- STICKER_UPDATE: 91,
1084
- STICKER_DELETE: 92,
1085
- GUILD_SCHEDULED_EVENT_CREATE: 100,
1086
- GUILD_SCHEDULED_EVENT_UPDATE: 101,
1087
- GUILD_SCHEDULED_EVENT_DELETE: 102,
1088
- THREAD_CREATE: 110,
1089
- THREAD_UPDATE: 111,
1090
- THREAD_DELETE: 112,
1091
- APPLICATION_COMMAND_PERMISSION_UPDATE: 121,
1092
- SOUNDBOARD_SOUND_CREATE: 130,
1093
- SOUNDBOARD_SOUND_UPDATE: 131,
1094
- SOUNDBOARD_SOUND_DELETE: 132,
1095
- AUTO_MODERATION_RULE_CREATE: 140,
1096
- AUTO_MODERATION_RULE_UPDATE: 141,
1097
- AUTO_MODERATION_RULE_DELETE: 142,
1098
- AUTO_MODERATION_BLOCK_MESSAGE: 143,
1099
- AUTO_MODERATION_FLAG_TO_CHANNEL: 144,
1100
- AUTO_MODERATION_USER_COMM_DISABLED: 145,
1101
- AUTO_MODERATION_QUARANTINE_USER: 146,
1102
- CREATOR_MONETIZATION_REQUEST_CREATED: 150,
1103
- CREATOR_MONETIZATION_TERMS_ACCEPTED: 151,
1104
- ONBOARDING_PROMPT_CREATE: 163,
1105
- ONBOARDING_PROMPT_UPDATE: 164,
1106
- ONBOARDING_PROMPT_DELETE: 165,
1107
- ONBOARDING_CREATE: 166,
1108
- ONBOARDING_UPDATE: 167,
1109
- GUILD_HOME_FEATURE_ITEM: 171,
1110
- GUILD_HOME_REMOVE_ITEM: 172,
1111
- HARMFUL_LINKS_BLOCKED_MESSAGE: 180,
1112
- HOME_SETTINGS_CREATE: 190,
1113
- HOME_SETTINGS_UPDATE: 191,
1114
- VOICE_CHANNEL_STATUS_CREATE: 192,
1115
- VOICE_CHANNEL_STATUS_DELETE: 193,
1116
- GUILD_PROFILE_UPDATE: 211
1117
- };
1118
- export const IntegrationTypes = {
1119
- DISCORD: "discord",
1120
- TWITCH: "twitch",
1121
- YOUTUBE: "youtube",
1122
- GUILD_SUBSCRIPTION: "guild_subscription"
1123
- };
1124
- export const AutomodEventType = {
1125
- /**
1126
- * A user submitted a message to a channel
1127
- */
1128
- MESSAGE_SEND: 1,
1129
- /**
1130
- * A user is attempting to join the server or a member's properties were updated.
1131
- */
1132
- GUILD_MEMBER_JOIN_OR_UPDATE: 2
1133
- };
1134
- export const AutomodActionType = {
1135
- /**
1136
- * Block a user's message and prevent it from being posted. A custom explanation can be specified and shown to members whenever their message is blocked
1137
- */
1138
- BLOCK_MESSAGE: 1,
1139
- /**
1140
- * Send a system message to a channel in order to log the user message that triggered the rule
1141
- */
1142
- FLAG_TO_CHANNEL: 2,
1143
- /**
1144
- * Temporarily disable a user's ability to communicate in the server (timeout)
1145
- */
1146
- USER_COMMUNICATION_DISABLED: 3,
1147
- /**
1148
- * Prevent a user from interacting in the server
1149
- */
1150
- QUARANTINE_USER: 4
1151
- };
1152
- export const AutomodTriggerType = {
1153
- /**
1154
- * Check if content contains words from a list of keywords or matches regex
1155
- */
1156
- KEYWORD: 1,
1157
- /**
1158
- * DEPRECATED
1159
- */
1160
- SPAM_LINK: 2,
1161
- /**
1162
- * Check if content represents generic spam
1163
- */
1164
- ML_SPAM: 3,
1165
- /**
1166
- * Check if content contains words from internal pre-defined wordsets
1167
- */
1168
- DEFAULT_KEYWORD_LIST: 4,
1169
- /**
1170
- * Check if content contains more unique mentions than allowed
1171
- */
1172
- MENTION_SPAM: 5
1173
- };
1174
- export const AutomodKeywordPresetType = {
1175
- /**
1176
- * Words and phrases that may be considered profanity
1177
- */
1178
- PROFANITY: 1,
1179
- /**
1180
- * Words and phrases that may be considered as sexual content
1181
- */
1182
- SEXUAL_CONTENT: 2,
1183
- /**
1184
- * Words and phrases that may be considered slurs and hate speech
1185
- */
1186
- SLURS: 3
1187
- };
1188
- export const IntegrationExpireBehaviorTypes = {
1189
- /**
1190
- * Remove role
1191
- */
1192
- REMOVE_ROLE: 0,
1193
- /**
1194
- * Kick
1195
- */
1196
- KICK: 1
1197
- };
1198
- export const IntegrationExpireGracePeriodTypes = {
1199
- /**
1200
- * 1 day
1201
- */
1202
- ONE_DAY: 1,
1203
- /**
1204
- * 3 days
1205
- */
1206
- THREE_DAYS: 3,
1207
- /**
1208
- * 7 days
1209
- */
1210
- SEVEN_DAYS: 7,
1211
- /**
1212
- * 14 days
1213
- */
1214
- FOURTEEN_DAYS: 14,
1215
- /**
1216
- * 30 days
1217
- */
1218
- THIRTY_DAYS: 30
1219
- };
1220
- export const NewMemberActionType = {
1221
- VIEW: 0,
1222
- TALK: 1
1223
- };
1224
- export const OnboardingPromptType = {
1225
- /**
1226
- * Multiple choice options
1227
- */
1228
- MULTIPLE_CHOICE: 0,
1229
- /**
1230
- * Many options shown as a dropdown
1231
- */
1232
- DROPDOWN: 1
1233
- };
1234
- export const GuildOnboardingMode = {
1235
- /**
1236
- * Only Default Channels considered in constraints
1237
- */
1238
- ONBOARDING_DEFAULT: 0,
1239
- /**
1240
- * Default Channels and Onboarding Prompts considered in constraints
1241
- */
1242
- ONBOARDING_ADVANCED: 1
1243
- };
1244
- export const WidgetImageStyles = {
1245
- /**
1246
- * shield style widget with Discord icon and guild members online count
1247
- */
1248
- SHIELD: "shield",
1249
- /**
1250
- * large image with guild icon, name and online count. "POWERED BY DISCORD" as the footer of the widget
1251
- */
1252
- BANNER1: "banner1",
1253
- /**
1254
- * smaller widget style with guild icon, name and online count. Split on the right with Discord logo
1255
- */
1256
- BANNER2: "banner2",
1257
- /**
1258
- * large image with guild icon, name and online count. In the footer, Discord logo on the left and "Chat Now" on the right
1259
- */
1260
- BANNER3: "banner3",
1261
- /**
1262
- * large Discord logo at the top of the widget. Guild icon, name and online count in the middle portion of the widget and a "JOIN MY SERVER" button at the bottom
1263
- */
1264
- BANNER4: "banner4"
1265
- };
1266
- export const InteractionCallbackTypes = {
1267
- PONG: 1,
1268
- CHANNEL_MESSAGE_WITH_SOURCE: 4,
1269
- DEFERRED_CHANNEL_MESSAGE_WITH_SOURCE: 5,
1270
- DEFERRED_UPDATE_MESSAGE: 6,
1271
- UPDATE_MESSAGE: 7,
1272
- APPLICATION_COMMAND_AUTOCOMPLETE_RESULT: 8,
1273
- MODAL: 9,
1274
- LAUNCH_ACTIVITY: 12
1275
- };
1276
- export const ApplicationIdentityProviderAuthType = {
1277
- OIDC: "OIDC",
1278
- EPIC_ONLINE_SERVICES_ACCESS_TOKEN: "EPIC_ONLINE_SERVICES_ACCESS_TOKEN",
1279
- EPIC_ONLINE_SERVICES_ID_TOKEN: "EPIC_ONLINE_SERVICES_ID_TOKEN",
1280
- STEAM_SESSION_TICKET: "STEAM_SESSION_TICKET",
1281
- UNITY_SERVICES_ID_TOKEN: "UNITY_SERVICES_ID_TOKEN",
1282
- DISCORD_BOT_ISSUED_ACCESS_TOKEN: "DISCORD_BOT_ISSUED_ACCESS_TOKEN",
1283
- APPLE_ID_TOKEN: "APPLE_ID_TOKEN",
1284
- PLAYSTATION_NETWORK_ID_TOKEN: "PLAYSTATION_NETWORK_ID_TOKEN"
1285
- };
1286
- export const StageInstancesPrivacyLevels = {
1287
- /**
1288
- * The Stage instance is visible publicly. (deprecated)
1289
- */
1290
- PUBLIC: 1,
1291
- /**
1292
- * The Stage instance is visible publicly. (deprecated)
1293
- */
1294
- GUILD_ONLY: 2
1295
- };
1296
- export const PremiumTypes = {
1297
- /**
1298
- * None
1299
- */
1300
- NONE: 0,
1301
- /**
1302
- * Nitro Classic
1303
- */
1304
- TIER_1: 1,
1305
- /**
1306
- * Nitro Standard
1307
- */
1308
- TIER_2: 2,
1309
- /**
1310
- * Nitro Basic
1311
- */
1312
- TIER_0: 3
1313
- };
1314
- export const ConnectedAccountProviders = {
1315
- BATTLENET: "battlenet",
1316
- BLUESKY: "bluesky",
1317
- BUNGIE: "bungie",
1318
- EBAY: "ebay",
1319
- EPIC_GAMES: "epicgames",
1320
- FACEBOOK: "facebook",
1321
- GITHUB: "github",
1322
- INSTAGRAM: "instagram",
1323
- MASTODON: "mastodon",
1324
- LEAGUE_OF_LEGENDS: "leagueoflegends",
1325
- PAYPAL: "paypal",
1326
- PLAYSTATION: "playstation",
1327
- REDDIT: "reddit",
1328
- RIOT_GAMES: "riotgames",
1329
- ROBLOX: "roblox",
1330
- SKYPE: "skype",
1331
- SPOTIFY: "spotify",
1332
- STEAM: "steam",
1333
- TIKTOK: "tiktok",
1334
- TWITCH: "twitch",
1335
- TWITTER: "twitter",
1336
- XBOX: "xbox",
1337
- YOUTUBE: "youtube",
1338
- DOMAIN: "domain"
1339
- };
1340
- export const ConnectedAccountVisibility = {
1341
- NONE: 0,
1342
- EVERYONE: 1
1343
- };
1344
- export const make = (httpClient, options = {}) => {
1345
- const unexpectedStatus = response => Effect.flatMap(Effect.orElseSucceed(response.json, () => "Unexpected status code"), description => Effect.fail(new HttpClientError.ResponseError({
1346
- request: response.request,
1347
- response,
1348
- reason: "StatusCode",
1349
- description: typeof description === "string" ? description : JSON.stringify(description)
1350
- })));
1351
- const withResponse = options.transformClient ? f => request => Effect.flatMap(Effect.flatMap(options.transformClient(httpClient), client => client.execute(request)), f) : f => request => Effect.flatMap(httpClient.execute(request), f);
1352
- const decodeSuccess = response => response.json;
1353
- const decodeVoid = _response => Effect.void;
1354
- const decodeError = tag => response => Effect.flatMap(response.json, cause => Effect.fail(DiscordRestError(tag, cause, response)));
1355
- const onRequest = (successCodes, errorCodes) => {
1356
- const cases = {
1357
- orElse: unexpectedStatus
1358
- };
1359
- for (const code of successCodes) {
1360
- cases[code] = decodeSuccess;
1361
- }
1362
- if (errorCodes) {
1363
- for (const [code, tag] of Object.entries(errorCodes)) {
1364
- cases[code] = decodeError(tag);
1365
- }
1366
- }
1367
- if (successCodes.length === 0) {
1368
- cases["2xx"] = decodeVoid;
1369
- }
1370
- return withResponse(HttpClientResponse.matchStatus(cases));
1371
- };
1372
- return {
1373
- httpClient,
1374
- getMyApplication: () => HttpClientRequest.get(`/applications/@me`).pipe(onRequest(["2xx"], {
1375
- "429": "RatelimitedResponse",
1376
- "4xx": "ErrorResponse"
1377
- })),
1378
- updateMyApplication: options => HttpClientRequest.patch(`/applications/@me`).pipe(HttpClientRequest.bodyUnsafeJson(options), onRequest(["2xx"], {
1379
- "429": "RatelimitedResponse",
1380
- "4xx": "ErrorResponse"
1381
- })),
1382
- getApplication: applicationId => HttpClientRequest.get(`/applications/${applicationId}`).pipe(onRequest(["2xx"], {
1383
- "429": "RatelimitedResponse",
1384
- "4xx": "ErrorResponse"
1385
- })),
1386
- updateApplication: (applicationId, options) => HttpClientRequest.patch(`/applications/${applicationId}`).pipe(HttpClientRequest.bodyUnsafeJson(options), onRequest(["2xx"], {
1387
- "429": "RatelimitedResponse",
1388
- "4xx": "ErrorResponse"
1389
- })),
1390
- applicationsGetActivityInstance: (applicationId, instanceId) => HttpClientRequest.get(`/applications/${applicationId}/activity-instances/${instanceId}`).pipe(onRequest(["2xx"], {
1391
- "429": "RatelimitedResponse",
1392
- "4xx": "ErrorResponse"
1393
- })),
1394
- uploadApplicationAttachment: (applicationId, options) => HttpClientRequest.post(`/applications/${applicationId}/attachment`).pipe(HttpClientRequest.bodyFormDataRecord(options), onRequest(["2xx"], {
1395
- "429": "RatelimitedResponse",
1396
- "4xx": "ErrorResponse"
1397
- })),
1398
- listApplicationCommands: (applicationId, options) => HttpClientRequest.get(`/applications/${applicationId}/commands`).pipe(HttpClientRequest.setUrlParams({
1399
- with_localizations: options?.["with_localizations"]
1400
- }), onRequest(["2xx"], {
1401
- "429": "RatelimitedResponse",
1402
- "4xx": "ErrorResponse"
1403
- })),
1404
- bulkSetApplicationCommands: (applicationId, options) => HttpClientRequest.put(`/applications/${applicationId}/commands`).pipe(HttpClientRequest.bodyUnsafeJson(options), onRequest(["2xx"], {
1405
- "429": "RatelimitedResponse",
1406
- "4xx": "ErrorResponse"
1407
- })),
1408
- createApplicationCommand: (applicationId, options) => HttpClientRequest.post(`/applications/${applicationId}/commands`).pipe(HttpClientRequest.bodyUnsafeJson(options), onRequest(["200", "201"], {
1409
- "429": "RatelimitedResponse",
1410
- "4xx": "ErrorResponse"
1411
- })),
1412
- getApplicationCommand: (applicationId, commandId) => HttpClientRequest.get(`/applications/${applicationId}/commands/${commandId}`).pipe(onRequest(["2xx"], {
1413
- "429": "RatelimitedResponse",
1414
- "4xx": "ErrorResponse"
1415
- })),
1416
- deleteApplicationCommand: (applicationId, commandId) => HttpClientRequest.del(`/applications/${applicationId}/commands/${commandId}`).pipe(onRequest([], {
1417
- "429": "RatelimitedResponse",
1418
- "4xx": "ErrorResponse"
1419
- })),
1420
- updateApplicationCommand: (applicationId, commandId, options) => HttpClientRequest.patch(`/applications/${applicationId}/commands/${commandId}`).pipe(HttpClientRequest.bodyUnsafeJson(options), onRequest(["2xx"], {
1421
- "429": "RatelimitedResponse",
1422
- "4xx": "ErrorResponse"
1423
- })),
1424
- listApplicationEmojis: applicationId => HttpClientRequest.get(`/applications/${applicationId}/emojis`).pipe(onRequest(["2xx"], {
1425
- "429": "RatelimitedResponse",
1426
- "4xx": "ErrorResponse"
1427
- })),
1428
- createApplicationEmoji: (applicationId, options) => HttpClientRequest.post(`/applications/${applicationId}/emojis`).pipe(HttpClientRequest.bodyUnsafeJson(options), onRequest(["2xx"], {
1429
- "429": "RatelimitedResponse",
1430
- "4xx": "ErrorResponse"
1431
- })),
1432
- getApplicationEmoji: (applicationId, emojiId) => HttpClientRequest.get(`/applications/${applicationId}/emojis/${emojiId}`).pipe(onRequest(["2xx"], {
1433
- "429": "RatelimitedResponse",
1434
- "4xx": "ErrorResponse"
1435
- })),
1436
- deleteApplicationEmoji: (applicationId, emojiId) => HttpClientRequest.del(`/applications/${applicationId}/emojis/${emojiId}`).pipe(onRequest([], {
1437
- "429": "RatelimitedResponse",
1438
- "4xx": "ErrorResponse"
1439
- })),
1440
- updateApplicationEmoji: (applicationId, emojiId, options) => HttpClientRequest.patch(`/applications/${applicationId}/emojis/${emojiId}`).pipe(HttpClientRequest.bodyUnsafeJson(options), onRequest(["2xx"], {
1441
- "429": "RatelimitedResponse",
1442
- "4xx": "ErrorResponse"
1443
- })),
1444
- getEntitlements: (applicationId, options) => HttpClientRequest.get(`/applications/${applicationId}/entitlements`).pipe(HttpClientRequest.setUrlParams({
1445
- user_id: options?.["user_id"],
1446
- sku_ids: options?.["sku_ids"],
1447
- guild_id: options?.["guild_id"],
1448
- before: options?.["before"],
1449
- after: options?.["after"],
1450
- limit: options?.["limit"],
1451
- exclude_ended: options?.["exclude_ended"],
1452
- exclude_deleted: options?.["exclude_deleted"],
1453
- only_active: options?.["only_active"]
1454
- }), onRequest(["2xx"], {
1455
- "429": "RatelimitedResponse",
1456
- "4xx": "ErrorResponse"
1457
- })),
1458
- createEntitlement: (applicationId, options) => HttpClientRequest.post(`/applications/${applicationId}/entitlements`).pipe(HttpClientRequest.bodyUnsafeJson(options), onRequest(["2xx"], {
1459
- "429": "RatelimitedResponse",
1460
- "4xx": "ErrorResponse"
1461
- })),
1462
- getEntitlement: (applicationId, entitlementId) => HttpClientRequest.get(`/applications/${applicationId}/entitlements/${entitlementId}`).pipe(onRequest(["2xx"], {
1463
- "429": "RatelimitedResponse",
1464
- "4xx": "ErrorResponse"
1465
- })),
1466
- deleteEntitlement: (applicationId, entitlementId) => HttpClientRequest.del(`/applications/${applicationId}/entitlements/${entitlementId}`).pipe(onRequest([], {
1467
- "429": "RatelimitedResponse",
1468
- "4xx": "ErrorResponse"
1469
- })),
1470
- consumeEntitlement: (applicationId, entitlementId) => HttpClientRequest.post(`/applications/${applicationId}/entitlements/${entitlementId}/consume`).pipe(onRequest([], {
1471
- "429": "RatelimitedResponse",
1472
- "4xx": "ErrorResponse"
1473
- })),
1474
- listGuildApplicationCommands: (applicationId, guildId, options) => HttpClientRequest.get(`/applications/${applicationId}/guilds/${guildId}/commands`).pipe(HttpClientRequest.setUrlParams({
1475
- with_localizations: options?.["with_localizations"]
1476
- }), onRequest(["2xx"], {
1477
- "429": "RatelimitedResponse",
1478
- "4xx": "ErrorResponse"
1479
- })),
1480
- bulkSetGuildApplicationCommands: (applicationId, guildId, options) => HttpClientRequest.put(`/applications/${applicationId}/guilds/${guildId}/commands`).pipe(HttpClientRequest.bodyUnsafeJson(options), onRequest(["2xx"], {
1481
- "429": "RatelimitedResponse",
1482
- "4xx": "ErrorResponse"
1483
- })),
1484
- createGuildApplicationCommand: (applicationId, guildId, options) => HttpClientRequest.post(`/applications/${applicationId}/guilds/${guildId}/commands`).pipe(HttpClientRequest.bodyUnsafeJson(options), onRequest(["200", "201"], {
1485
- "429": "RatelimitedResponse",
1486
- "4xx": "ErrorResponse"
1487
- })),
1488
- listGuildApplicationCommandPermissions: (applicationId, guildId) => HttpClientRequest.get(`/applications/${applicationId}/guilds/${guildId}/commands/permissions`).pipe(onRequest(["2xx"], {
1489
- "429": "RatelimitedResponse",
1490
- "4xx": "ErrorResponse"
1491
- })),
1492
- getGuildApplicationCommand: (applicationId, guildId, commandId) => HttpClientRequest.get(`/applications/${applicationId}/guilds/${guildId}/commands/${commandId}`).pipe(onRequest(["2xx"], {
1493
- "429": "RatelimitedResponse",
1494
- "4xx": "ErrorResponse"
1495
- })),
1496
- deleteGuildApplicationCommand: (applicationId, guildId, commandId) => HttpClientRequest.del(`/applications/${applicationId}/guilds/${guildId}/commands/${commandId}`).pipe(onRequest([], {
1497
- "429": "RatelimitedResponse",
1498
- "4xx": "ErrorResponse"
1499
- })),
1500
- updateGuildApplicationCommand: (applicationId, guildId, commandId, options) => HttpClientRequest.patch(`/applications/${applicationId}/guilds/${guildId}/commands/${commandId}`).pipe(HttpClientRequest.bodyUnsafeJson(options), onRequest(["2xx"], {
1501
- "429": "RatelimitedResponse",
1502
- "4xx": "ErrorResponse"
1503
- })),
1504
- getGuildApplicationCommandPermissions: (applicationId, guildId, commandId) => HttpClientRequest.get(`/applications/${applicationId}/guilds/${guildId}/commands/${commandId}/permissions`).pipe(onRequest(["2xx"], {
1505
- "429": "RatelimitedResponse",
1506
- "4xx": "ErrorResponse"
1507
- })),
1508
- setGuildApplicationCommandPermissions: (applicationId, guildId, commandId, options) => HttpClientRequest.put(`/applications/${applicationId}/guilds/${guildId}/commands/${commandId}/permissions`).pipe(HttpClientRequest.bodyUnsafeJson(options), onRequest(["2xx"], {
1509
- "429": "RatelimitedResponse",
1510
- "4xx": "ErrorResponse"
1511
- })),
1512
- getApplicationRoleConnectionsMetadata: applicationId => HttpClientRequest.get(`/applications/${applicationId}/role-connections/metadata`).pipe(onRequest(["2xx"], {
1513
- "429": "RatelimitedResponse",
1514
- "4xx": "ErrorResponse"
1515
- })),
1516
- updateApplicationRoleConnectionsMetadata: (applicationId, options) => HttpClientRequest.put(`/applications/${applicationId}/role-connections/metadata`).pipe(HttpClientRequest.bodyUnsafeJson(options), onRequest(["2xx"], {
1517
- "429": "RatelimitedResponse",
1518
- "4xx": "ErrorResponse"
1519
- })),
1520
- getChannel: channelId => HttpClientRequest.get(`/channels/${channelId}`).pipe(onRequest(["2xx"], {
1521
- "429": "RatelimitedResponse",
1522
- "4xx": "ErrorResponse"
1523
- })),
1524
- deleteChannel: channelId => HttpClientRequest.del(`/channels/${channelId}`).pipe(onRequest(["2xx"], {
1525
- "429": "RatelimitedResponse",
1526
- "4xx": "ErrorResponse"
1527
- })),
1528
- updateChannel: (channelId, options) => HttpClientRequest.patch(`/channels/${channelId}`).pipe(HttpClientRequest.bodyUnsafeJson(options), onRequest(["2xx"], {
1529
- "429": "RatelimitedResponse",
1530
- "4xx": "ErrorResponse"
1531
- })),
1532
- followChannel: (channelId, options) => HttpClientRequest.post(`/channels/${channelId}/followers`).pipe(HttpClientRequest.bodyUnsafeJson(options), onRequest(["2xx"], {
1533
- "429": "RatelimitedResponse",
1534
- "4xx": "ErrorResponse"
1535
- })),
1536
- listChannelInvites: channelId => HttpClientRequest.get(`/channels/${channelId}/invites`).pipe(onRequest(["2xx"], {
1537
- "429": "RatelimitedResponse",
1538
- "4xx": "ErrorResponse"
1539
- })),
1540
- createChannelInvite: (channelId, options) => HttpClientRequest.post(`/channels/${channelId}/invites`).pipe(HttpClientRequest.bodyUnsafeJson(options), onRequest(["2xx"], {
1541
- "429": "RatelimitedResponse",
1542
- "4xx": "ErrorResponse"
1543
- })),
1544
- listMessages: (channelId, options) => HttpClientRequest.get(`/channels/${channelId}/messages`).pipe(HttpClientRequest.setUrlParams({
1545
- around: options?.["around"],
1546
- before: options?.["before"],
1547
- after: options?.["after"],
1548
- limit: options?.["limit"]
1549
- }), onRequest(["2xx"], {
1550
- "429": "RatelimitedResponse",
1551
- "4xx": "ErrorResponse"
1552
- })),
1553
- createMessage: (channelId, options) => HttpClientRequest.post(`/channels/${channelId}/messages`).pipe(HttpClientRequest.bodyUnsafeJson(options), onRequest(["2xx"], {
1554
- "429": "RatelimitedResponse",
1555
- "4xx": "ErrorResponse"
1556
- })),
1557
- bulkDeleteMessages: (channelId, options) => HttpClientRequest.post(`/channels/${channelId}/messages/bulk-delete`).pipe(HttpClientRequest.bodyUnsafeJson(options), onRequest([], {
1558
- "429": "RatelimitedResponse",
1559
- "4xx": "ErrorResponse"
1560
- })),
1561
- listPins: (channelId, options) => HttpClientRequest.get(`/channels/${channelId}/messages/pins`).pipe(HttpClientRequest.setUrlParams({
1562
- before: options?.["before"],
1563
- limit: options?.["limit"]
1564
- }), onRequest(["2xx"], {
1565
- "429": "RatelimitedResponse",
1566
- "4xx": "ErrorResponse"
1567
- })),
1568
- createPin: (channelId, messageId) => HttpClientRequest.put(`/channels/${channelId}/messages/pins/${messageId}`).pipe(onRequest([], {
1569
- "429": "RatelimitedResponse",
1570
- "4xx": "ErrorResponse"
1571
- })),
1572
- deletePin: (channelId, messageId) => HttpClientRequest.del(`/channels/${channelId}/messages/pins/${messageId}`).pipe(onRequest([], {
1573
- "429": "RatelimitedResponse",
1574
- "4xx": "ErrorResponse"
1575
- })),
1576
- getMessage: (channelId, messageId) => HttpClientRequest.get(`/channels/${channelId}/messages/${messageId}`).pipe(onRequest(["2xx"], {
1577
- "429": "RatelimitedResponse",
1578
- "4xx": "ErrorResponse"
1579
- })),
1580
- deleteMessage: (channelId, messageId) => HttpClientRequest.del(`/channels/${channelId}/messages/${messageId}`).pipe(onRequest([], {
1581
- "429": "RatelimitedResponse",
1582
- "4xx": "ErrorResponse"
1583
- })),
1584
- updateMessage: (channelId, messageId, options) => HttpClientRequest.patch(`/channels/${channelId}/messages/${messageId}`).pipe(HttpClientRequest.bodyUnsafeJson(options), onRequest(["2xx"], {
1585
- "429": "RatelimitedResponse",
1586
- "4xx": "ErrorResponse"
1587
- })),
1588
- crosspostMessage: (channelId, messageId) => HttpClientRequest.post(`/channels/${channelId}/messages/${messageId}/crosspost`).pipe(onRequest(["2xx"], {
1589
- "429": "RatelimitedResponse",
1590
- "4xx": "ErrorResponse"
1591
- })),
1592
- deleteAllMessageReactions: (channelId, messageId) => HttpClientRequest.del(`/channels/${channelId}/messages/${messageId}/reactions`).pipe(onRequest([], {
1593
- "429": "RatelimitedResponse",
1594
- "4xx": "ErrorResponse"
1595
- })),
1596
- listMessageReactionsByEmoji: (channelId, messageId, emojiName, options) => HttpClientRequest.get(`/channels/${channelId}/messages/${messageId}/reactions/${emojiName}`).pipe(HttpClientRequest.setUrlParams({
1597
- after: options?.["after"],
1598
- limit: options?.["limit"],
1599
- type: options?.["type"]
1600
- }), onRequest(["2xx"], {
1601
- "429": "RatelimitedResponse",
1602
- "4xx": "ErrorResponse"
1603
- })),
1604
- deleteAllMessageReactionsByEmoji: (channelId, messageId, emojiName) => HttpClientRequest.del(`/channels/${channelId}/messages/${messageId}/reactions/${emojiName}`).pipe(onRequest([], {
1605
- "429": "RatelimitedResponse",
1606
- "4xx": "ErrorResponse"
1607
- })),
1608
- addMyMessageReaction: (channelId, messageId, emojiName) => HttpClientRequest.put(`/channels/${channelId}/messages/${messageId}/reactions/${emojiName}/@me`).pipe(onRequest([], {
1609
- "429": "RatelimitedResponse",
1610
- "4xx": "ErrorResponse"
1611
- })),
1612
- deleteMyMessageReaction: (channelId, messageId, emojiName) => HttpClientRequest.del(`/channels/${channelId}/messages/${messageId}/reactions/${emojiName}/@me`).pipe(onRequest([], {
1613
- "429": "RatelimitedResponse",
1614
- "4xx": "ErrorResponse"
1615
- })),
1616
- deleteUserMessageReaction: (channelId, messageId, emojiName, userId) => HttpClientRequest.del(`/channels/${channelId}/messages/${messageId}/reactions/${emojiName}/${userId}`).pipe(onRequest([], {
1617
- "429": "RatelimitedResponse",
1618
- "4xx": "ErrorResponse"
1619
- })),
1620
- createThreadFromMessage: (channelId, messageId, options) => HttpClientRequest.post(`/channels/${channelId}/messages/${messageId}/threads`).pipe(HttpClientRequest.bodyUnsafeJson(options), onRequest(["2xx"], {
1621
- "429": "RatelimitedResponse",
1622
- "4xx": "ErrorResponse"
1623
- })),
1624
- setChannelPermissionOverwrite: (channelId, overwriteId, options) => HttpClientRequest.put(`/channels/${channelId}/permissions/${overwriteId}`).pipe(HttpClientRequest.bodyUnsafeJson(options), onRequest([], {
1625
- "429": "RatelimitedResponse",
1626
- "4xx": "ErrorResponse"
1627
- })),
1628
- deleteChannelPermissionOverwrite: (channelId, overwriteId) => HttpClientRequest.del(`/channels/${channelId}/permissions/${overwriteId}`).pipe(onRequest([], {
1629
- "429": "RatelimitedResponse",
1630
- "4xx": "ErrorResponse"
1631
- })),
1632
- deprecatedListPins: channelId => HttpClientRequest.get(`/channels/${channelId}/pins`).pipe(onRequest(["2xx"], {
1633
- "429": "RatelimitedResponse",
1634
- "4xx": "ErrorResponse"
1635
- })),
1636
- deprecatedCreatePin: (channelId, messageId) => HttpClientRequest.put(`/channels/${channelId}/pins/${messageId}`).pipe(onRequest([], {
1637
- "429": "RatelimitedResponse",
1638
- "4xx": "ErrorResponse"
1639
- })),
1640
- deprecatedDeletePin: (channelId, messageId) => HttpClientRequest.del(`/channels/${channelId}/pins/${messageId}`).pipe(onRequest([], {
1641
- "429": "RatelimitedResponse",
1642
- "4xx": "ErrorResponse"
1643
- })),
1644
- getAnswerVoters: (channelId, messageId, answerId, options) => HttpClientRequest.get(`/channels/${channelId}/polls/${messageId}/answers/${answerId}`).pipe(HttpClientRequest.setUrlParams({
1645
- after: options?.["after"],
1646
- limit: options?.["limit"]
1647
- }), onRequest(["2xx"], {
1648
- "429": "RatelimitedResponse",
1649
- "4xx": "ErrorResponse"
1650
- })),
1651
- pollExpire: (channelId, messageId) => HttpClientRequest.post(`/channels/${channelId}/polls/${messageId}/expire`).pipe(onRequest(["2xx"], {
1652
- "429": "RatelimitedResponse",
1653
- "4xx": "ErrorResponse"
1654
- })),
1655
- addGroupDmUser: (channelId, userId, options) => HttpClientRequest.put(`/channels/${channelId}/recipients/${userId}`).pipe(HttpClientRequest.bodyUnsafeJson(options), onRequest(["2xx"], {
1656
- "429": "RatelimitedResponse",
1657
- "4xx": "ErrorResponse"
1658
- })),
1659
- deleteGroupDmUser: (channelId, userId) => HttpClientRequest.del(`/channels/${channelId}/recipients/${userId}`).pipe(onRequest([], {
1660
- "429": "RatelimitedResponse",
1661
- "4xx": "ErrorResponse"
1662
- })),
1663
- sendSoundboardSound: (channelId, options) => HttpClientRequest.post(`/channels/${channelId}/send-soundboard-sound`).pipe(HttpClientRequest.bodyUnsafeJson(options), onRequest([], {
1664
- "429": "RatelimitedResponse",
1665
- "4xx": "ErrorResponse"
1666
- })),
1667
- listThreadMembers: (channelId, options) => HttpClientRequest.get(`/channels/${channelId}/thread-members`).pipe(HttpClientRequest.setUrlParams({
1668
- with_member: options?.["with_member"],
1669
- limit: options?.["limit"],
1670
- after: options?.["after"]
1671
- }), onRequest(["2xx"], {
1672
- "429": "RatelimitedResponse",
1673
- "4xx": "ErrorResponse"
1674
- })),
1675
- joinThread: channelId => HttpClientRequest.put(`/channels/${channelId}/thread-members/@me`).pipe(onRequest([], {
1676
- "429": "RatelimitedResponse",
1677
- "4xx": "ErrorResponse"
1678
- })),
1679
- leaveThread: channelId => HttpClientRequest.del(`/channels/${channelId}/thread-members/@me`).pipe(onRequest([], {
1680
- "429": "RatelimitedResponse",
1681
- "4xx": "ErrorResponse"
1682
- })),
1683
- getThreadMember: (channelId, userId, options) => HttpClientRequest.get(`/channels/${channelId}/thread-members/${userId}`).pipe(HttpClientRequest.setUrlParams({
1684
- with_member: options?.["with_member"]
1685
- }), onRequest(["2xx"], {
1686
- "429": "RatelimitedResponse",
1687
- "4xx": "ErrorResponse"
1688
- })),
1689
- addThreadMember: (channelId, userId) => HttpClientRequest.put(`/channels/${channelId}/thread-members/${userId}`).pipe(onRequest([], {
1690
- "429": "RatelimitedResponse",
1691
- "4xx": "ErrorResponse"
1692
- })),
1693
- deleteThreadMember: (channelId, userId) => HttpClientRequest.del(`/channels/${channelId}/thread-members/${userId}`).pipe(onRequest([], {
1694
- "429": "RatelimitedResponse",
1695
- "4xx": "ErrorResponse"
1696
- })),
1697
- createThread: (channelId, options) => HttpClientRequest.post(`/channels/${channelId}/threads`).pipe(HttpClientRequest.bodyUnsafeJson(options), onRequest(["2xx"], {
1698
- "429": "RatelimitedResponse",
1699
- "4xx": "ErrorResponse"
1700
- })),
1701
- listPrivateArchivedThreads: (channelId, options) => HttpClientRequest.get(`/channels/${channelId}/threads/archived/private`).pipe(HttpClientRequest.setUrlParams({
1702
- before: options?.["before"],
1703
- limit: options?.["limit"]
1704
- }), onRequest(["2xx"], {
1705
- "429": "RatelimitedResponse",
1706
- "4xx": "ErrorResponse"
1707
- })),
1708
- listPublicArchivedThreads: (channelId, options) => HttpClientRequest.get(`/channels/${channelId}/threads/archived/public`).pipe(HttpClientRequest.setUrlParams({
1709
- before: options?.["before"],
1710
- limit: options?.["limit"]
1711
- }), onRequest(["2xx"], {
1712
- "429": "RatelimitedResponse",
1713
- "4xx": "ErrorResponse"
1714
- })),
1715
- threadSearch: (channelId, options) => HttpClientRequest.get(`/channels/${channelId}/threads/search`).pipe(HttpClientRequest.setUrlParams({
1716
- name: options?.["name"],
1717
- slop: options?.["slop"],
1718
- min_id: options?.["min_id"],
1719
- max_id: options?.["max_id"],
1720
- tag: options?.["tag"],
1721
- tag_setting: options?.["tag_setting"],
1722
- archived: options?.["archived"],
1723
- sort_by: options?.["sort_by"],
1724
- sort_order: options?.["sort_order"],
1725
- limit: options?.["limit"],
1726
- offset: options?.["offset"]
1727
- }), onRequest(["2xx"], {
1728
- "429": "RatelimitedResponse",
1729
- "4xx": "ErrorResponse"
1730
- })),
1731
- triggerTypingIndicator: channelId => HttpClientRequest.post(`/channels/${channelId}/typing`).pipe(onRequest(["2xx"], {
1732
- "429": "RatelimitedResponse",
1733
- "4xx": "ErrorResponse"
1734
- })),
1735
- listMyPrivateArchivedThreads: (channelId, options) => HttpClientRequest.get(`/channels/${channelId}/users/@me/threads/archived/private`).pipe(HttpClientRequest.setUrlParams({
1736
- before: options?.["before"],
1737
- limit: options?.["limit"]
1738
- }), onRequest(["2xx"], {
1739
- "429": "RatelimitedResponse",
1740
- "4xx": "ErrorResponse"
1741
- })),
1742
- listChannelWebhooks: channelId => HttpClientRequest.get(`/channels/${channelId}/webhooks`).pipe(onRequest(["2xx"], {
1743
- "429": "RatelimitedResponse",
1744
- "4xx": "ErrorResponse"
1745
- })),
1746
- createWebhook: (channelId, options) => HttpClientRequest.post(`/channels/${channelId}/webhooks`).pipe(HttpClientRequest.bodyUnsafeJson(options), onRequest(["2xx"], {
1747
- "429": "RatelimitedResponse",
1748
- "4xx": "ErrorResponse"
1749
- })),
1750
- getGateway: () => HttpClientRequest.get(`/gateway`).pipe(onRequest(["2xx"], {
1751
- "429": "RatelimitedResponse",
1752
- "4xx": "ErrorResponse"
1753
- })),
1754
- getBotGateway: () => HttpClientRequest.get(`/gateway/bot`).pipe(onRequest(["2xx"], {
1755
- "429": "RatelimitedResponse",
1756
- "4xx": "ErrorResponse"
1757
- })),
1758
- getGuildTemplate: code => HttpClientRequest.get(`/guilds/templates/${code}`).pipe(onRequest(["2xx"], {
1759
- "429": "RatelimitedResponse",
1760
- "4xx": "ErrorResponse"
1761
- })),
1762
- getGuild: (guildId, options) => HttpClientRequest.get(`/guilds/${guildId}`).pipe(HttpClientRequest.setUrlParams({
1763
- with_counts: options?.["with_counts"]
1764
- }), onRequest(["2xx"], {
1765
- "429": "RatelimitedResponse",
1766
- "4xx": "ErrorResponse"
1767
- })),
1768
- updateGuild: (guildId, options) => HttpClientRequest.patch(`/guilds/${guildId}`).pipe(HttpClientRequest.bodyUnsafeJson(options), onRequest(["2xx"], {
1769
- "429": "RatelimitedResponse",
1770
- "4xx": "ErrorResponse"
1771
- })),
1772
- listGuildAuditLogEntries: (guildId, options) => HttpClientRequest.get(`/guilds/${guildId}/audit-logs`).pipe(HttpClientRequest.setUrlParams({
1773
- user_id: options?.["user_id"],
1774
- target_id: options?.["target_id"],
1775
- action_type: options?.["action_type"],
1776
- before: options?.["before"],
1777
- after: options?.["after"],
1778
- limit: options?.["limit"]
1779
- }), onRequest(["2xx"], {
1780
- "429": "RatelimitedResponse",
1781
- "4xx": "ErrorResponse"
1782
- })),
1783
- listAutoModerationRules: guildId => HttpClientRequest.get(`/guilds/${guildId}/auto-moderation/rules`).pipe(onRequest(["2xx"], {
1784
- "429": "RatelimitedResponse",
1785
- "4xx": "ErrorResponse"
1786
- })),
1787
- createAutoModerationRule: (guildId, options) => HttpClientRequest.post(`/guilds/${guildId}/auto-moderation/rules`).pipe(HttpClientRequest.bodyUnsafeJson(options), onRequest(["2xx"], {
1788
- "429": "RatelimitedResponse",
1789
- "4xx": "ErrorResponse"
1790
- })),
1791
- getAutoModerationRule: (guildId, ruleId) => HttpClientRequest.get(`/guilds/${guildId}/auto-moderation/rules/${ruleId}`).pipe(onRequest(["2xx"], {
1792
- "429": "RatelimitedResponse",
1793
- "4xx": "ErrorResponse"
1794
- })),
1795
- deleteAutoModerationRule: (guildId, ruleId) => HttpClientRequest.del(`/guilds/${guildId}/auto-moderation/rules/${ruleId}`).pipe(onRequest([], {
1796
- "429": "RatelimitedResponse",
1797
- "4xx": "ErrorResponse"
1798
- })),
1799
- updateAutoModerationRule: (guildId, ruleId, options) => HttpClientRequest.patch(`/guilds/${guildId}/auto-moderation/rules/${ruleId}`).pipe(HttpClientRequest.bodyUnsafeJson(options), onRequest(["2xx"], {
1800
- "429": "RatelimitedResponse",
1801
- "4xx": "ErrorResponse"
1802
- })),
1803
- listGuildBans: (guildId, options) => HttpClientRequest.get(`/guilds/${guildId}/bans`).pipe(HttpClientRequest.setUrlParams({
1804
- limit: options?.["limit"],
1805
- before: options?.["before"],
1806
- after: options?.["after"]
1807
- }), onRequest(["2xx"], {
1808
- "429": "RatelimitedResponse",
1809
- "4xx": "ErrorResponse"
1810
- })),
1811
- getGuildBan: (guildId, userId) => HttpClientRequest.get(`/guilds/${guildId}/bans/${userId}`).pipe(onRequest(["2xx"], {
1812
- "429": "RatelimitedResponse",
1813
- "4xx": "ErrorResponse"
1814
- })),
1815
- banUserFromGuild: (guildId, userId, options) => HttpClientRequest.put(`/guilds/${guildId}/bans/${userId}`).pipe(HttpClientRequest.bodyUnsafeJson(options), onRequest([], {
1816
- "429": "RatelimitedResponse",
1817
- "4xx": "ErrorResponse"
1818
- })),
1819
- unbanUserFromGuild: (guildId, userId, options) => HttpClientRequest.del(`/guilds/${guildId}/bans/${userId}`).pipe(HttpClientRequest.bodyUnsafeJson(options), onRequest([], {
1820
- "429": "RatelimitedResponse",
1821
- "4xx": "ErrorResponse"
1822
- })),
1823
- bulkBanUsersFromGuild: (guildId, options) => HttpClientRequest.post(`/guilds/${guildId}/bulk-ban`).pipe(HttpClientRequest.bodyUnsafeJson(options), onRequest(["2xx"], {
1824
- "429": "RatelimitedResponse",
1825
- "4xx": "ErrorResponse"
1826
- })),
1827
- listGuildChannels: guildId => HttpClientRequest.get(`/guilds/${guildId}/channels`).pipe(onRequest(["2xx"], {
1828
- "429": "RatelimitedResponse",
1829
- "4xx": "ErrorResponse"
1830
- })),
1831
- createGuildChannel: (guildId, options) => HttpClientRequest.post(`/guilds/${guildId}/channels`).pipe(HttpClientRequest.bodyUnsafeJson(options), onRequest(["2xx"], {
1832
- "429": "RatelimitedResponse",
1833
- "4xx": "ErrorResponse"
1834
- })),
1835
- bulkUpdateGuildChannels: (guildId, options) => HttpClientRequest.patch(`/guilds/${guildId}/channels`).pipe(HttpClientRequest.bodyUnsafeJson(options), onRequest([], {
1836
- "429": "RatelimitedResponse",
1837
- "4xx": "ErrorResponse"
1838
- })),
1839
- listGuildEmojis: guildId => HttpClientRequest.get(`/guilds/${guildId}/emojis`).pipe(onRequest(["2xx"], {
1840
- "429": "RatelimitedResponse",
1841
- "4xx": "ErrorResponse"
1842
- })),
1843
- createGuildEmoji: (guildId, options) => HttpClientRequest.post(`/guilds/${guildId}/emojis`).pipe(HttpClientRequest.bodyUnsafeJson(options), onRequest(["2xx"], {
1844
- "429": "RatelimitedResponse",
1845
- "4xx": "ErrorResponse"
1846
- })),
1847
- getGuildEmoji: (guildId, emojiId) => HttpClientRequest.get(`/guilds/${guildId}/emojis/${emojiId}`).pipe(onRequest(["2xx"], {
1848
- "429": "RatelimitedResponse",
1849
- "4xx": "ErrorResponse"
1850
- })),
1851
- deleteGuildEmoji: (guildId, emojiId) => HttpClientRequest.del(`/guilds/${guildId}/emojis/${emojiId}`).pipe(onRequest([], {
1852
- "429": "RatelimitedResponse",
1853
- "4xx": "ErrorResponse"
1854
- })),
1855
- updateGuildEmoji: (guildId, emojiId, options) => HttpClientRequest.patch(`/guilds/${guildId}/emojis/${emojiId}`).pipe(HttpClientRequest.bodyUnsafeJson(options), onRequest(["2xx"], {
1856
- "429": "RatelimitedResponse",
1857
- "4xx": "ErrorResponse"
1858
- })),
1859
- listGuildIntegrations: guildId => HttpClientRequest.get(`/guilds/${guildId}/integrations`).pipe(onRequest(["2xx"], {
1860
- "429": "RatelimitedResponse",
1861
- "4xx": "ErrorResponse"
1862
- })),
1863
- deleteGuildIntegration: (guildId, integrationId) => HttpClientRequest.del(`/guilds/${guildId}/integrations/${integrationId}`).pipe(onRequest([], {
1864
- "429": "RatelimitedResponse",
1865
- "4xx": "ErrorResponse"
1866
- })),
1867
- listGuildInvites: guildId => HttpClientRequest.get(`/guilds/${guildId}/invites`).pipe(onRequest(["2xx"], {
1868
- "429": "RatelimitedResponse",
1869
- "4xx": "ErrorResponse"
1870
- })),
1871
- listGuildMembers: (guildId, options) => HttpClientRequest.get(`/guilds/${guildId}/members`).pipe(HttpClientRequest.setUrlParams({
1872
- limit: options?.["limit"],
1873
- after: options?.["after"]
1874
- }), onRequest(["2xx"], {
1875
- "429": "RatelimitedResponse",
1876
- "4xx": "ErrorResponse"
1877
- })),
1878
- updateMyGuildMember: (guildId, options) => HttpClientRequest.patch(`/guilds/${guildId}/members/@me`).pipe(HttpClientRequest.bodyUnsafeJson(options), onRequest(["2xx"], {
1879
- "429": "RatelimitedResponse",
1880
- "4xx": "ErrorResponse"
1881
- })),
1882
- searchGuildMembers: (guildId, options) => HttpClientRequest.get(`/guilds/${guildId}/members/search`).pipe(HttpClientRequest.setUrlParams({
1883
- limit: options?.["limit"],
1884
- query: options?.["query"]
1885
- }), onRequest(["2xx"], {
1886
- "429": "RatelimitedResponse",
1887
- "4xx": "ErrorResponse"
1888
- })),
1889
- getGuildMember: (guildId, userId) => HttpClientRequest.get(`/guilds/${guildId}/members/${userId}`).pipe(onRequest(["2xx"], {
1890
- "429": "RatelimitedResponse",
1891
- "4xx": "ErrorResponse"
1892
- })),
1893
- addGuildMember: (guildId, userId, options) => HttpClientRequest.put(`/guilds/${guildId}/members/${userId}`).pipe(HttpClientRequest.bodyUnsafeJson(options), onRequest(["2xx"], {
1894
- "429": "RatelimitedResponse",
1895
- "4xx": "ErrorResponse"
1896
- })),
1897
- deleteGuildMember: (guildId, userId) => HttpClientRequest.del(`/guilds/${guildId}/members/${userId}`).pipe(onRequest([], {
1898
- "429": "RatelimitedResponse",
1899
- "4xx": "ErrorResponse"
1900
- })),
1901
- updateGuildMember: (guildId, userId, options) => HttpClientRequest.patch(`/guilds/${guildId}/members/${userId}`).pipe(HttpClientRequest.bodyUnsafeJson(options), onRequest(["2xx"], {
1902
- "429": "RatelimitedResponse",
1903
- "4xx": "ErrorResponse"
1904
- })),
1905
- addGuildMemberRole: (guildId, userId, roleId) => HttpClientRequest.put(`/guilds/${guildId}/members/${userId}/roles/${roleId}`).pipe(onRequest([], {
1906
- "429": "RatelimitedResponse",
1907
- "4xx": "ErrorResponse"
1908
- })),
1909
- deleteGuildMemberRole: (guildId, userId, roleId) => HttpClientRequest.del(`/guilds/${guildId}/members/${userId}/roles/${roleId}`).pipe(onRequest([], {
1910
- "429": "RatelimitedResponse",
1911
- "4xx": "ErrorResponse"
1912
- })),
1913
- getGuildNewMemberWelcome: guildId => HttpClientRequest.get(`/guilds/${guildId}/new-member-welcome`).pipe(onRequest(["2xx"], {
1914
- "429": "RatelimitedResponse",
1915
- "4xx": "ErrorResponse"
1916
- })),
1917
- getGuildsOnboarding: guildId => HttpClientRequest.get(`/guilds/${guildId}/onboarding`).pipe(onRequest(["2xx"], {
1918
- "429": "RatelimitedResponse",
1919
- "4xx": "ErrorResponse"
1920
- })),
1921
- putGuildsOnboarding: (guildId, options) => HttpClientRequest.put(`/guilds/${guildId}/onboarding`).pipe(HttpClientRequest.bodyUnsafeJson(options), onRequest(["2xx"], {
1922
- "429": "RatelimitedResponse",
1923
- "4xx": "ErrorResponse"
1924
- })),
1925
- getGuildPreview: guildId => HttpClientRequest.get(`/guilds/${guildId}/preview`).pipe(onRequest(["2xx"], {
1926
- "429": "RatelimitedResponse",
1927
- "4xx": "ErrorResponse"
1928
- })),
1929
- previewPruneGuild: (guildId, options) => HttpClientRequest.get(`/guilds/${guildId}/prune`).pipe(HttpClientRequest.setUrlParams({
1930
- days: options?.["days"],
1931
- include_roles: options?.["include_roles"]
1932
- }), onRequest(["2xx"], {
1933
- "429": "RatelimitedResponse",
1934
- "4xx": "ErrorResponse"
1935
- })),
1936
- pruneGuild: (guildId, options) => HttpClientRequest.post(`/guilds/${guildId}/prune`).pipe(HttpClientRequest.bodyUnsafeJson(options), onRequest(["2xx"], {
1937
- "429": "RatelimitedResponse",
1938
- "4xx": "ErrorResponse"
1939
- })),
1940
- listGuildVoiceRegions: guildId => HttpClientRequest.get(`/guilds/${guildId}/regions`).pipe(onRequest(["2xx"], {
1941
- "429": "RatelimitedResponse",
1942
- "4xx": "ErrorResponse"
1943
- })),
1944
- listGuildRoles: guildId => HttpClientRequest.get(`/guilds/${guildId}/roles`).pipe(onRequest(["2xx"], {
1945
- "429": "RatelimitedResponse",
1946
- "4xx": "ErrorResponse"
1947
- })),
1948
- createGuildRole: (guildId, options) => HttpClientRequest.post(`/guilds/${guildId}/roles`).pipe(HttpClientRequest.bodyUnsafeJson(options), onRequest(["2xx"], {
1949
- "429": "RatelimitedResponse",
1950
- "4xx": "ErrorResponse"
1951
- })),
1952
- bulkUpdateGuildRoles: (guildId, options) => HttpClientRequest.patch(`/guilds/${guildId}/roles`).pipe(HttpClientRequest.bodyUnsafeJson(options), onRequest(["2xx"], {
1953
- "429": "RatelimitedResponse",
1954
- "4xx": "ErrorResponse"
1955
- })),
1956
- getGuildRole: (guildId, roleId) => HttpClientRequest.get(`/guilds/${guildId}/roles/${roleId}`).pipe(onRequest(["2xx"], {
1957
- "429": "RatelimitedResponse",
1958
- "4xx": "ErrorResponse"
1959
- })),
1960
- deleteGuildRole: (guildId, roleId) => HttpClientRequest.del(`/guilds/${guildId}/roles/${roleId}`).pipe(onRequest([], {
1961
- "429": "RatelimitedResponse",
1962
- "4xx": "ErrorResponse"
1963
- })),
1964
- updateGuildRole: (guildId, roleId, options) => HttpClientRequest.patch(`/guilds/${guildId}/roles/${roleId}`).pipe(HttpClientRequest.bodyUnsafeJson(options), onRequest(["2xx"], {
1965
- "429": "RatelimitedResponse",
1966
- "4xx": "ErrorResponse"
1967
- })),
1968
- listGuildScheduledEvents: (guildId, options) => HttpClientRequest.get(`/guilds/${guildId}/scheduled-events`).pipe(HttpClientRequest.setUrlParams({
1969
- with_user_count: options?.["with_user_count"]
1970
- }), onRequest(["2xx"], {
1971
- "429": "RatelimitedResponse",
1972
- "4xx": "ErrorResponse"
1973
- })),
1974
- createGuildScheduledEvent: (guildId, options) => HttpClientRequest.post(`/guilds/${guildId}/scheduled-events`).pipe(HttpClientRequest.bodyUnsafeJson(options), onRequest(["2xx"], {
1975
- "429": "RatelimitedResponse",
1976
- "4xx": "ErrorResponse"
1977
- })),
1978
- getGuildScheduledEvent: (guildId, guildScheduledEventId, options) => HttpClientRequest.get(`/guilds/${guildId}/scheduled-events/${guildScheduledEventId}`).pipe(HttpClientRequest.setUrlParams({
1979
- with_user_count: options?.["with_user_count"]
1980
- }), onRequest(["2xx"], {
1981
- "429": "RatelimitedResponse",
1982
- "4xx": "ErrorResponse"
1983
- })),
1984
- deleteGuildScheduledEvent: (guildId, guildScheduledEventId) => HttpClientRequest.del(`/guilds/${guildId}/scheduled-events/${guildScheduledEventId}`).pipe(onRequest([], {
1985
- "429": "RatelimitedResponse",
1986
- "4xx": "ErrorResponse"
1987
- })),
1988
- updateGuildScheduledEvent: (guildId, guildScheduledEventId, options) => HttpClientRequest.patch(`/guilds/${guildId}/scheduled-events/${guildScheduledEventId}`).pipe(HttpClientRequest.bodyUnsafeJson(options), onRequest(["2xx"], {
1989
- "429": "RatelimitedResponse",
1990
- "4xx": "ErrorResponse"
1991
- })),
1992
- listGuildScheduledEventUsers: (guildId, guildScheduledEventId, options) => HttpClientRequest.get(`/guilds/${guildId}/scheduled-events/${guildScheduledEventId}/users`).pipe(HttpClientRequest.setUrlParams({
1993
- with_member: options?.["with_member"],
1994
- limit: options?.["limit"],
1995
- before: options?.["before"],
1996
- after: options?.["after"]
1997
- }), onRequest(["2xx"], {
1998
- "429": "RatelimitedResponse",
1999
- "4xx": "ErrorResponse"
2000
- })),
2001
- listGuildSoundboardSounds: guildId => HttpClientRequest.get(`/guilds/${guildId}/soundboard-sounds`).pipe(onRequest(["2xx"], {
2002
- "429": "RatelimitedResponse",
2003
- "4xx": "ErrorResponse"
2004
- })),
2005
- createGuildSoundboardSound: (guildId, options) => HttpClientRequest.post(`/guilds/${guildId}/soundboard-sounds`).pipe(HttpClientRequest.bodyUnsafeJson(options), onRequest(["2xx"], {
2006
- "429": "RatelimitedResponse",
2007
- "4xx": "ErrorResponse"
2008
- })),
2009
- getGuildSoundboardSound: (guildId, soundId) => HttpClientRequest.get(`/guilds/${guildId}/soundboard-sounds/${soundId}`).pipe(onRequest(["2xx"], {
2010
- "429": "RatelimitedResponse",
2011
- "4xx": "ErrorResponse"
2012
- })),
2013
- deleteGuildSoundboardSound: (guildId, soundId) => HttpClientRequest.del(`/guilds/${guildId}/soundboard-sounds/${soundId}`).pipe(onRequest([], {
2014
- "429": "RatelimitedResponse",
2015
- "4xx": "ErrorResponse"
2016
- })),
2017
- updateGuildSoundboardSound: (guildId, soundId, options) => HttpClientRequest.patch(`/guilds/${guildId}/soundboard-sounds/${soundId}`).pipe(HttpClientRequest.bodyUnsafeJson(options), onRequest(["2xx"], {
2018
- "429": "RatelimitedResponse",
2019
- "4xx": "ErrorResponse"
2020
- })),
2021
- listGuildStickers: guildId => HttpClientRequest.get(`/guilds/${guildId}/stickers`).pipe(onRequest(["2xx"], {
2022
- "429": "RatelimitedResponse",
2023
- "4xx": "ErrorResponse"
2024
- })),
2025
- createGuildSticker: (guildId, options) => HttpClientRequest.post(`/guilds/${guildId}/stickers`).pipe(HttpClientRequest.bodyFormDataRecord(options), onRequest(["2xx"], {
2026
- "429": "RatelimitedResponse",
2027
- "4xx": "ErrorResponse"
2028
- })),
2029
- getGuildSticker: (guildId, stickerId) => HttpClientRequest.get(`/guilds/${guildId}/stickers/${stickerId}`).pipe(onRequest(["2xx"], {
2030
- "429": "RatelimitedResponse",
2031
- "4xx": "ErrorResponse"
2032
- })),
2033
- deleteGuildSticker: (guildId, stickerId) => HttpClientRequest.del(`/guilds/${guildId}/stickers/${stickerId}`).pipe(onRequest([], {
2034
- "429": "RatelimitedResponse",
2035
- "4xx": "ErrorResponse"
2036
- })),
2037
- updateGuildSticker: (guildId, stickerId, options) => HttpClientRequest.patch(`/guilds/${guildId}/stickers/${stickerId}`).pipe(HttpClientRequest.bodyUnsafeJson(options), onRequest(["2xx"], {
2038
- "429": "RatelimitedResponse",
2039
- "4xx": "ErrorResponse"
2040
- })),
2041
- listGuildTemplates: guildId => HttpClientRequest.get(`/guilds/${guildId}/templates`).pipe(onRequest(["2xx"], {
2042
- "429": "RatelimitedResponse",
2043
- "4xx": "ErrorResponse"
2044
- })),
2045
- createGuildTemplate: (guildId, options) => HttpClientRequest.post(`/guilds/${guildId}/templates`).pipe(HttpClientRequest.bodyUnsafeJson(options), onRequest(["2xx"], {
2046
- "429": "RatelimitedResponse",
2047
- "4xx": "ErrorResponse"
2048
- })),
2049
- syncGuildTemplate: (guildId, code) => HttpClientRequest.put(`/guilds/${guildId}/templates/${code}`).pipe(onRequest(["2xx"], {
2050
- "429": "RatelimitedResponse",
2051
- "4xx": "ErrorResponse"
2052
- })),
2053
- deleteGuildTemplate: (guildId, code) => HttpClientRequest.del(`/guilds/${guildId}/templates/${code}`).pipe(onRequest(["2xx"], {
2054
- "429": "RatelimitedResponse",
2055
- "4xx": "ErrorResponse"
2056
- })),
2057
- updateGuildTemplate: (guildId, code, options) => HttpClientRequest.patch(`/guilds/${guildId}/templates/${code}`).pipe(HttpClientRequest.bodyUnsafeJson(options), onRequest(["2xx"], {
2058
- "429": "RatelimitedResponse",
2059
- "4xx": "ErrorResponse"
2060
- })),
2061
- getActiveGuildThreads: guildId => HttpClientRequest.get(`/guilds/${guildId}/threads/active`).pipe(onRequest(["2xx"], {
2062
- "429": "RatelimitedResponse",
2063
- "4xx": "ErrorResponse"
2064
- })),
2065
- getGuildVanityUrl: guildId => HttpClientRequest.get(`/guilds/${guildId}/vanity-url`).pipe(onRequest(["2xx"], {
2066
- "429": "RatelimitedResponse",
2067
- "4xx": "ErrorResponse"
2068
- })),
2069
- getSelfVoiceState: guildId => HttpClientRequest.get(`/guilds/${guildId}/voice-states/@me`).pipe(onRequest(["2xx"], {
2070
- "429": "RatelimitedResponse",
2071
- "4xx": "ErrorResponse"
2072
- })),
2073
- updateSelfVoiceState: (guildId, options) => HttpClientRequest.patch(`/guilds/${guildId}/voice-states/@me`).pipe(HttpClientRequest.bodyUnsafeJson(options), onRequest([], {
2074
- "429": "RatelimitedResponse",
2075
- "4xx": "ErrorResponse"
2076
- })),
2077
- getVoiceState: (guildId, userId) => HttpClientRequest.get(`/guilds/${guildId}/voice-states/${userId}`).pipe(onRequest(["2xx"], {
2078
- "429": "RatelimitedResponse",
2079
- "4xx": "ErrorResponse"
2080
- })),
2081
- updateVoiceState: (guildId, userId, options) => HttpClientRequest.patch(`/guilds/${guildId}/voice-states/${userId}`).pipe(HttpClientRequest.bodyUnsafeJson(options), onRequest([], {
2082
- "429": "RatelimitedResponse",
2083
- "4xx": "ErrorResponse"
2084
- })),
2085
- getGuildWebhooks: guildId => HttpClientRequest.get(`/guilds/${guildId}/webhooks`).pipe(onRequest(["2xx"], {
2086
- "429": "RatelimitedResponse",
2087
- "4xx": "ErrorResponse"
2088
- })),
2089
- getGuildWelcomeScreen: guildId => HttpClientRequest.get(`/guilds/${guildId}/welcome-screen`).pipe(onRequest(["2xx"], {
2090
- "429": "RatelimitedResponse",
2091
- "4xx": "ErrorResponse"
2092
- })),
2093
- updateGuildWelcomeScreen: (guildId, options) => HttpClientRequest.patch(`/guilds/${guildId}/welcome-screen`).pipe(HttpClientRequest.bodyUnsafeJson(options), onRequest(["2xx"], {
2094
- "429": "RatelimitedResponse",
2095
- "4xx": "ErrorResponse"
2096
- })),
2097
- getGuildWidgetSettings: guildId => HttpClientRequest.get(`/guilds/${guildId}/widget`).pipe(onRequest(["2xx"], {
2098
- "429": "RatelimitedResponse",
2099
- "4xx": "ErrorResponse"
2100
- })),
2101
- updateGuildWidgetSettings: (guildId, options) => HttpClientRequest.patch(`/guilds/${guildId}/widget`).pipe(HttpClientRequest.bodyUnsafeJson(options), onRequest(["2xx"], {
2102
- "429": "RatelimitedResponse",
2103
- "4xx": "ErrorResponse"
2104
- })),
2105
- getGuildWidget: guildId => HttpClientRequest.get(`/guilds/${guildId}/widget.json`).pipe(onRequest(["2xx"], {
2106
- "429": "RatelimitedResponse",
2107
- "4xx": "ErrorResponse"
2108
- })),
2109
- getGuildWidgetPng: (guildId, options) => HttpClientRequest.get(`/guilds/${guildId}/widget.png`).pipe(HttpClientRequest.setUrlParams({
2110
- style: options?.["style"]
2111
- }), onRequest([], {
2112
- "429": "RatelimitedResponse",
2113
- "4xx": "ErrorResponse"
2114
- })),
2115
- createInteractionResponse: (interactionId, interactionToken, options) => HttpClientRequest.post(`/interactions/${interactionId}/${interactionToken}/callback`).pipe(HttpClientRequest.setUrlParams({
2116
- with_response: options.params?.["with_response"]
2117
- }), HttpClientRequest.bodyUnsafeJson(options.payload), onRequest(["2xx"], {
2118
- "429": "RatelimitedResponse",
2119
- "4xx": "ErrorResponse"
2120
- })),
2121
- inviteResolve: (code, options) => HttpClientRequest.get(`/invites/${code}`).pipe(HttpClientRequest.setUrlParams({
2122
- with_counts: options?.["with_counts"],
2123
- guild_scheduled_event_id: options?.["guild_scheduled_event_id"]
2124
- }), onRequest(["2xx"], {
2125
- "429": "RatelimitedResponse",
2126
- "4xx": "ErrorResponse"
2127
- })),
2128
- inviteRevoke: code => HttpClientRequest.del(`/invites/${code}`).pipe(onRequest(["2xx"], {
2129
- "429": "RatelimitedResponse",
2130
- "4xx": "ErrorResponse"
2131
- })),
2132
- createOrJoinLobby: options => HttpClientRequest.put(`/lobbies`).pipe(HttpClientRequest.bodyUnsafeJson(options), onRequest(["2xx"], {
2133
- "429": "RatelimitedResponse",
2134
- "4xx": "ErrorResponse"
2135
- })),
2136
- createLobby: options => HttpClientRequest.post(`/lobbies`).pipe(HttpClientRequest.bodyUnsafeJson(options), onRequest(["2xx"], {
2137
- "429": "RatelimitedResponse",
2138
- "4xx": "ErrorResponse"
2139
- })),
2140
- getLobby: lobbyId => HttpClientRequest.get(`/lobbies/${lobbyId}`).pipe(onRequest(["2xx"], {
2141
- "429": "RatelimitedResponse",
2142
- "4xx": "ErrorResponse"
2143
- })),
2144
- editLobby: (lobbyId, options) => HttpClientRequest.patch(`/lobbies/${lobbyId}`).pipe(HttpClientRequest.bodyUnsafeJson(options), onRequest(["2xx"], {
2145
- "429": "RatelimitedResponse",
2146
- "4xx": "ErrorResponse"
2147
- })),
2148
- editLobbyChannelLink: (lobbyId, options) => HttpClientRequest.patch(`/lobbies/${lobbyId}/channel-linking`).pipe(HttpClientRequest.bodyUnsafeJson(options), onRequest(["2xx"], {
2149
- "429": "RatelimitedResponse",
2150
- "4xx": "ErrorResponse"
2151
- })),
2152
- leaveLobby: lobbyId => HttpClientRequest.del(`/lobbies/${lobbyId}/members/@me`).pipe(onRequest([], {
2153
- "429": "RatelimitedResponse",
2154
- "4xx": "ErrorResponse"
2155
- })),
2156
- createLinkedLobbyGuildInviteForSelf: lobbyId => HttpClientRequest.post(`/lobbies/${lobbyId}/members/@me/invites`).pipe(onRequest(["2xx"], {
2157
- "429": "RatelimitedResponse",
2158
- "4xx": "ErrorResponse"
2159
- })),
2160
- bulkUpdateLobbyMembers: (lobbyId, options) => HttpClientRequest.post(`/lobbies/${lobbyId}/members/bulk`).pipe(HttpClientRequest.bodyUnsafeJson(options), onRequest(["2xx"], {
2161
- "429": "RatelimitedResponse",
2162
- "4xx": "ErrorResponse"
2163
- })),
2164
- addLobbyMember: (lobbyId, userId, options) => HttpClientRequest.put(`/lobbies/${lobbyId}/members/${userId}`).pipe(HttpClientRequest.bodyUnsafeJson(options), onRequest(["2xx"], {
2165
- "429": "RatelimitedResponse",
2166
- "4xx": "ErrorResponse"
2167
- })),
2168
- deleteLobbyMember: (lobbyId, userId) => HttpClientRequest.del(`/lobbies/${lobbyId}/members/${userId}`).pipe(onRequest([], {
2169
- "429": "RatelimitedResponse",
2170
- "4xx": "ErrorResponse"
2171
- })),
2172
- createLinkedLobbyGuildInviteForUser: (lobbyId, userId) => HttpClientRequest.post(`/lobbies/${lobbyId}/members/${userId}/invites`).pipe(onRequest(["2xx"], {
2173
- "429": "RatelimitedResponse",
2174
- "4xx": "ErrorResponse"
2175
- })),
2176
- getLobbyMessages: (lobbyId, options) => HttpClientRequest.get(`/lobbies/${lobbyId}/messages`).pipe(HttpClientRequest.setUrlParams({
2177
- limit: options?.["limit"]
2178
- }), onRequest(["2xx"], {
2179
- "429": "RatelimitedResponse",
2180
- "4xx": "ErrorResponse"
2181
- })),
2182
- createLobbyMessage: (lobbyId, options) => HttpClientRequest.post(`/lobbies/${lobbyId}/messages`).pipe(HttpClientRequest.bodyUnsafeJson(options), onRequest(["2xx"], {
2183
- "429": "RatelimitedResponse",
2184
- "4xx": "ErrorResponse"
2185
- })),
2186
- getMyOauth2Authorization: () => HttpClientRequest.get(`/oauth2/@me`).pipe(onRequest(["2xx"], {
2187
- "429": "RatelimitedResponse",
2188
- "4xx": "ErrorResponse"
2189
- })),
2190
- getMyOauth2Application: () => HttpClientRequest.get(`/oauth2/applications/@me`).pipe(onRequest(["2xx"], {
2191
- "429": "RatelimitedResponse",
2192
- "4xx": "ErrorResponse"
2193
- })),
2194
- getPublicKeys: () => HttpClientRequest.get(`/oauth2/keys`).pipe(onRequest(["2xx"], {
2195
- "429": "RatelimitedResponse",
2196
- "4xx": "ErrorResponse"
2197
- })),
2198
- getOpenidConnectUserinfo: () => HttpClientRequest.get(`/oauth2/userinfo`).pipe(onRequest(["2xx"], {
2199
- "429": "RatelimitedResponse",
2200
- "4xx": "ErrorResponse"
2201
- })),
2202
- partnerSdkUnmergeProvisionalAccount: options => HttpClientRequest.post(`/partner-sdk/provisional-accounts/unmerge`).pipe(HttpClientRequest.bodyUnsafeJson(options), onRequest([], {
2203
- "429": "RatelimitedResponse",
2204
- "4xx": "ErrorResponse"
2205
- })),
2206
- botPartnerSdkUnmergeProvisionalAccount: options => HttpClientRequest.post(`/partner-sdk/provisional-accounts/unmerge/bot`).pipe(HttpClientRequest.bodyUnsafeJson(options), onRequest([], {
2207
- "429": "RatelimitedResponse",
2208
- "4xx": "ErrorResponse"
2209
- })),
2210
- partnerSdkToken: options => HttpClientRequest.post(`/partner-sdk/token`).pipe(HttpClientRequest.bodyUnsafeJson(options), onRequest(["2xx"], {
2211
- "429": "RatelimitedResponse",
2212
- "4xx": "ErrorResponse"
2213
- })),
2214
- botPartnerSdkToken: options => HttpClientRequest.post(`/partner-sdk/token/bot`).pipe(HttpClientRequest.bodyUnsafeJson(options), onRequest(["2xx"], {
2215
- "429": "RatelimitedResponse",
2216
- "4xx": "ErrorResponse"
2217
- })),
2218
- getSoundboardDefaultSounds: () => HttpClientRequest.get(`/soundboard-default-sounds`).pipe(onRequest(["2xx"], {
2219
- "429": "RatelimitedResponse",
2220
- "4xx": "ErrorResponse"
2221
- })),
2222
- createStageInstance: options => HttpClientRequest.post(`/stage-instances`).pipe(HttpClientRequest.bodyUnsafeJson(options), onRequest(["2xx"], {
2223
- "429": "RatelimitedResponse",
2224
- "4xx": "ErrorResponse"
2225
- })),
2226
- getStageInstance: channelId => HttpClientRequest.get(`/stage-instances/${channelId}`).pipe(onRequest(["2xx"], {
2227
- "429": "RatelimitedResponse",
2228
- "4xx": "ErrorResponse"
2229
- })),
2230
- deleteStageInstance: channelId => HttpClientRequest.del(`/stage-instances/${channelId}`).pipe(onRequest([], {
2231
- "429": "RatelimitedResponse",
2232
- "4xx": "ErrorResponse"
2233
- })),
2234
- updateStageInstance: (channelId, options) => HttpClientRequest.patch(`/stage-instances/${channelId}`).pipe(HttpClientRequest.bodyUnsafeJson(options), onRequest(["2xx"], {
2235
- "429": "RatelimitedResponse",
2236
- "4xx": "ErrorResponse"
2237
- })),
2238
- listStickerPacks: () => HttpClientRequest.get(`/sticker-packs`).pipe(onRequest(["2xx"], {
2239
- "429": "RatelimitedResponse",
2240
- "4xx": "ErrorResponse"
2241
- })),
2242
- getStickerPack: packId => HttpClientRequest.get(`/sticker-packs/${packId}`).pipe(onRequest(["2xx"], {
2243
- "429": "RatelimitedResponse",
2244
- "4xx": "ErrorResponse"
2245
- })),
2246
- getSticker: stickerId => HttpClientRequest.get(`/stickers/${stickerId}`).pipe(onRequest(["2xx"], {
2247
- "429": "RatelimitedResponse",
2248
- "4xx": "ErrorResponse"
2249
- })),
2250
- getMyUser: () => HttpClientRequest.get(`/users/@me`).pipe(onRequest(["2xx"], {
2251
- "429": "RatelimitedResponse",
2252
- "4xx": "ErrorResponse"
2253
- })),
2254
- updateMyUser: options => HttpClientRequest.patch(`/users/@me`).pipe(HttpClientRequest.bodyUnsafeJson(options), onRequest(["2xx"], {
2255
- "429": "RatelimitedResponse",
2256
- "4xx": "ErrorResponse"
2257
- })),
2258
- getApplicationUserRoleConnection: applicationId => HttpClientRequest.get(`/users/@me/applications/${applicationId}/role-connection`).pipe(onRequest(["2xx"], {
2259
- "429": "RatelimitedResponse",
2260
- "4xx": "ErrorResponse"
2261
- })),
2262
- updateApplicationUserRoleConnection: (applicationId, options) => HttpClientRequest.put(`/users/@me/applications/${applicationId}/role-connection`).pipe(HttpClientRequest.bodyUnsafeJson(options), onRequest(["2xx"], {
2263
- "429": "RatelimitedResponse",
2264
- "4xx": "ErrorResponse"
2265
- })),
2266
- deleteApplicationUserRoleConnection: applicationId => HttpClientRequest.del(`/users/@me/applications/${applicationId}/role-connection`).pipe(onRequest([], {
2267
- "429": "RatelimitedResponse",
2268
- "4xx": "ErrorResponse"
2269
- })),
2270
- createDm: options => HttpClientRequest.post(`/users/@me/channels`).pipe(HttpClientRequest.bodyUnsafeJson(options), onRequest(["2xx"], {
2271
- "429": "RatelimitedResponse",
2272
- "4xx": "ErrorResponse"
2273
- })),
2274
- listMyConnections: () => HttpClientRequest.get(`/users/@me/connections`).pipe(onRequest(["2xx"], {
2275
- "429": "RatelimitedResponse",
2276
- "4xx": "ErrorResponse"
2277
- })),
2278
- listMyGuilds: options => HttpClientRequest.get(`/users/@me/guilds`).pipe(HttpClientRequest.setUrlParams({
2279
- before: options?.["before"],
2280
- after: options?.["after"],
2281
- limit: options?.["limit"],
2282
- with_counts: options?.["with_counts"]
2283
- }), onRequest(["2xx"], {
2284
- "429": "RatelimitedResponse",
2285
- "4xx": "ErrorResponse"
2286
- })),
2287
- leaveGuild: guildId => HttpClientRequest.del(`/users/@me/guilds/${guildId}`).pipe(onRequest([], {
2288
- "429": "RatelimitedResponse",
2289
- "4xx": "ErrorResponse"
2290
- })),
2291
- getMyGuildMember: guildId => HttpClientRequest.get(`/users/@me/guilds/${guildId}/member`).pipe(onRequest(["2xx"], {
2292
- "429": "RatelimitedResponse",
2293
- "4xx": "ErrorResponse"
2294
- })),
2295
- getUser: userId => HttpClientRequest.get(`/users/${userId}`).pipe(onRequest(["2xx"], {
2296
- "429": "RatelimitedResponse",
2297
- "4xx": "ErrorResponse"
2298
- })),
2299
- listVoiceRegions: () => HttpClientRequest.get(`/voice/regions`).pipe(onRequest(["2xx"], {
2300
- "429": "RatelimitedResponse",
2301
- "4xx": "ErrorResponse"
2302
- })),
2303
- getWebhook: webhookId => HttpClientRequest.get(`/webhooks/${webhookId}`).pipe(onRequest(["2xx"], {
2304
- "429": "RatelimitedResponse",
2305
- "4xx": "ErrorResponse"
2306
- })),
2307
- deleteWebhook: webhookId => HttpClientRequest.del(`/webhooks/${webhookId}`).pipe(onRequest([], {
2308
- "429": "RatelimitedResponse",
2309
- "4xx": "ErrorResponse"
2310
- })),
2311
- updateWebhook: (webhookId, options) => HttpClientRequest.patch(`/webhooks/${webhookId}`).pipe(HttpClientRequest.bodyUnsafeJson(options), onRequest(["2xx"], {
2312
- "429": "RatelimitedResponse",
2313
- "4xx": "ErrorResponse"
2314
- })),
2315
- getWebhookByToken: (webhookId, webhookToken) => HttpClientRequest.get(`/webhooks/${webhookId}/${webhookToken}`).pipe(onRequest(["2xx"], {
2316
- "429": "RatelimitedResponse",
2317
- "4xx": "ErrorResponse"
2318
- })),
2319
- executeWebhook: (webhookId, webhookToken, options) => HttpClientRequest.post(`/webhooks/${webhookId}/${webhookToken}`).pipe(HttpClientRequest.setUrlParams({
2320
- wait: options.params?.["wait"],
2321
- thread_id: options.params?.["thread_id"],
2322
- with_components: options.params?.["with_components"]
2323
- }), HttpClientRequest.bodyUnsafeJson(options.payload), onRequest(["2xx"], {
2324
- "429": "RatelimitedResponse",
2325
- "4xx": "ErrorResponse"
2326
- })),
2327
- deleteWebhookByToken: (webhookId, webhookToken) => HttpClientRequest.del(`/webhooks/${webhookId}/${webhookToken}`).pipe(onRequest([], {
2328
- "429": "RatelimitedResponse",
2329
- "4xx": "ErrorResponse"
2330
- })),
2331
- updateWebhookByToken: (webhookId, webhookToken, options) => HttpClientRequest.patch(`/webhooks/${webhookId}/${webhookToken}`).pipe(HttpClientRequest.bodyUnsafeJson(options), onRequest(["2xx"], {
2332
- "429": "RatelimitedResponse",
2333
- "4xx": "ErrorResponse"
2334
- })),
2335
- executeGithubCompatibleWebhook: (webhookId, webhookToken, options) => HttpClientRequest.post(`/webhooks/${webhookId}/${webhookToken}/github`).pipe(HttpClientRequest.setUrlParams({
2336
- wait: options.params?.["wait"],
2337
- thread_id: options.params?.["thread_id"]
2338
- }), HttpClientRequest.bodyUnsafeJson(options.payload), onRequest([], {
2339
- "429": "RatelimitedResponse",
2340
- "4xx": "ErrorResponse"
2341
- })),
2342
- getOriginalWebhookMessage: (webhookId, webhookToken, options) => HttpClientRequest.get(`/webhooks/${webhookId}/${webhookToken}/messages/@original`).pipe(HttpClientRequest.setUrlParams({
2343
- thread_id: options?.["thread_id"]
2344
- }), onRequest(["2xx"], {
2345
- "429": "RatelimitedResponse",
2346
- "4xx": "ErrorResponse"
2347
- })),
2348
- deleteOriginalWebhookMessage: (webhookId, webhookToken, options) => HttpClientRequest.del(`/webhooks/${webhookId}/${webhookToken}/messages/@original`).pipe(HttpClientRequest.setUrlParams({
2349
- thread_id: options?.["thread_id"]
2350
- }), onRequest([], {
2351
- "429": "RatelimitedResponse",
2352
- "4xx": "ErrorResponse"
2353
- })),
2354
- updateOriginalWebhookMessage: (webhookId, webhookToken, options) => HttpClientRequest.patch(`/webhooks/${webhookId}/${webhookToken}/messages/@original`).pipe(HttpClientRequest.setUrlParams({
2355
- thread_id: options.params?.["thread_id"],
2356
- with_components: options.params?.["with_components"]
2357
- }), HttpClientRequest.bodyUnsafeJson(options.payload), onRequest(["2xx"], {
2358
- "429": "RatelimitedResponse",
2359
- "4xx": "ErrorResponse"
2360
- })),
2361
- getWebhookMessage: (webhookId, webhookToken, messageId, options) => HttpClientRequest.get(`/webhooks/${webhookId}/${webhookToken}/messages/${messageId}`).pipe(HttpClientRequest.setUrlParams({
2362
- thread_id: options?.["thread_id"]
2363
- }), onRequest(["2xx"], {
2364
- "429": "RatelimitedResponse",
2365
- "4xx": "ErrorResponse"
2366
- })),
2367
- deleteWebhookMessage: (webhookId, webhookToken, messageId, options) => HttpClientRequest.del(`/webhooks/${webhookId}/${webhookToken}/messages/${messageId}`).pipe(HttpClientRequest.setUrlParams({
2368
- thread_id: options?.["thread_id"]
2369
- }), onRequest([], {
2370
- "429": "RatelimitedResponse",
2371
- "4xx": "ErrorResponse"
2372
- })),
2373
- updateWebhookMessage: (webhookId, webhookToken, messageId, options) => HttpClientRequest.patch(`/webhooks/${webhookId}/${webhookToken}/messages/${messageId}`).pipe(HttpClientRequest.setUrlParams({
2374
- thread_id: options.params?.["thread_id"],
2375
- with_components: options.params?.["with_components"]
2376
- }), HttpClientRequest.bodyUnsafeJson(options.payload), onRequest(["2xx"], {
2377
- "429": "RatelimitedResponse",
2378
- "4xx": "ErrorResponse"
2379
- })),
2380
- executeSlackCompatibleWebhook: (webhookId, webhookToken, options) => HttpClientRequest.post(`/webhooks/${webhookId}/${webhookToken}/slack`).pipe(HttpClientRequest.setUrlParams({
2381
- wait: options.params?.["wait"],
2382
- thread_id: options.params?.["thread_id"]
2383
- }), HttpClientRequest.bodyUnsafeJson(options.payload), onRequest(["2xx"], {
2384
- "429": "RatelimitedResponse",
2385
- "4xx": "ErrorResponse"
2386
- }))
2387
- };
2388
- };
2389
- class DiscordRestErrorImpl extends Data.Error {}
2390
- export const DiscordRestError = (tag, cause, response) => new DiscordRestErrorImpl({
2391
- _tag: tag,
2392
- cause,
2393
- response,
2394
- request: response.request
2395
- });
2396
- //# sourceMappingURL=Generated.mjs.map