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