@buape/carbon 0.0.0-beta-20241008010229

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 (245) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +52 -0
  3. package/dist/package.json +34 -0
  4. package/dist/src/abstracts/AnySelectMenu.d.ts +31 -0
  5. package/dist/src/abstracts/AnySelectMenu.d.ts.map +1 -0
  6. package/dist/src/abstracts/AnySelectMenu.js +19 -0
  7. package/dist/src/abstracts/AnySelectMenu.js.map +1 -0
  8. package/dist/src/abstracts/AnySelectMenuInteraction.d.ts +13 -0
  9. package/dist/src/abstracts/AnySelectMenuInteraction.d.ts.map +1 -0
  10. package/dist/src/abstracts/AnySelectMenuInteraction.js +21 -0
  11. package/dist/src/abstracts/AnySelectMenuInteraction.js.map +1 -0
  12. package/dist/src/abstracts/Base.d.ts +10 -0
  13. package/dist/src/abstracts/Base.d.ts.map +1 -0
  14. package/dist/src/abstracts/Base.js +11 -0
  15. package/dist/src/abstracts/Base.js.map +1 -0
  16. package/dist/src/abstracts/BaseChannel.d.ts +45 -0
  17. package/dist/src/abstracts/BaseChannel.d.ts.map +1 -0
  18. package/dist/src/abstracts/BaseChannel.js +68 -0
  19. package/dist/src/abstracts/BaseChannel.js.map +1 -0
  20. package/dist/src/abstracts/BaseCommand.d.ts +58 -0
  21. package/dist/src/abstracts/BaseCommand.d.ts.map +1 -0
  22. package/dist/src/abstracts/BaseCommand.js +72 -0
  23. package/dist/src/abstracts/BaseCommand.js.map +1 -0
  24. package/dist/src/abstracts/BaseComponent.d.ts +34 -0
  25. package/dist/src/abstracts/BaseComponent.d.ts.map +1 -0
  26. package/dist/src/abstracts/BaseComponent.js +30 -0
  27. package/dist/src/abstracts/BaseComponent.js.map +1 -0
  28. package/dist/src/abstracts/BaseComponentInteraction.d.ts +19 -0
  29. package/dist/src/abstracts/BaseComponentInteraction.d.ts.map +1 -0
  30. package/dist/src/abstracts/BaseComponentInteraction.js +42 -0
  31. package/dist/src/abstracts/BaseComponentInteraction.js.map +1 -0
  32. package/dist/src/abstracts/BaseGuildChannel.d.ts +70 -0
  33. package/dist/src/abstracts/BaseGuildChannel.d.ts.map +1 -0
  34. package/dist/src/abstracts/BaseGuildChannel.js +143 -0
  35. package/dist/src/abstracts/BaseGuildChannel.js.map +1 -0
  36. package/dist/src/abstracts/BaseGuildTextChannel.d.ts +46 -0
  37. package/dist/src/abstracts/BaseGuildTextChannel.d.ts.map +1 -0
  38. package/dist/src/abstracts/BaseGuildTextChannel.js +77 -0
  39. package/dist/src/abstracts/BaseGuildTextChannel.js.map +1 -0
  40. package/dist/src/abstracts/BaseInteraction.d.ts +92 -0
  41. package/dist/src/abstracts/BaseInteraction.d.ts.map +1 -0
  42. package/dist/src/abstracts/BaseInteraction.js +152 -0
  43. package/dist/src/abstracts/BaseInteraction.js.map +1 -0
  44. package/dist/src/abstracts/GuildThreadOnlyChannel.d.ts +43 -0
  45. package/dist/src/abstracts/GuildThreadOnlyChannel.d.ts.map +1 -0
  46. package/dist/src/abstracts/GuildThreadOnlyChannel.js +69 -0
  47. package/dist/src/abstracts/GuildThreadOnlyChannel.js.map +1 -0
  48. package/dist/src/classes/Button.d.ts +49 -0
  49. package/dist/src/classes/Button.d.ts.map +1 -0
  50. package/dist/src/classes/Button.js +61 -0
  51. package/dist/src/classes/Button.js.map +1 -0
  52. package/dist/src/classes/ChannelSelectMenu.d.ts +15 -0
  53. package/dist/src/classes/ChannelSelectMenu.d.ts.map +1 -0
  54. package/dist/src/classes/ChannelSelectMenu.js +15 -0
  55. package/dist/src/classes/ChannelSelectMenu.js.map +1 -0
  56. package/dist/src/classes/Client.d.ts +180 -0
  57. package/dist/src/classes/Client.d.ts.map +1 -0
  58. package/dist/src/classes/Client.js +263 -0
  59. package/dist/src/classes/Client.js.map +1 -0
  60. package/dist/src/classes/Command.d.ts +33 -0
  61. package/dist/src/classes/Command.d.ts.map +1 -0
  62. package/dist/src/classes/Command.js +31 -0
  63. package/dist/src/classes/Command.js.map +1 -0
  64. package/dist/src/classes/CommandWithSubcommandGroups.d.ts +22 -0
  65. package/dist/src/classes/CommandWithSubcommandGroups.d.ts.map +1 -0
  66. package/dist/src/classes/CommandWithSubcommandGroups.js +31 -0
  67. package/dist/src/classes/CommandWithSubcommandGroups.js.map +1 -0
  68. package/dist/src/classes/CommandWithSubcommands.d.ts +19 -0
  69. package/dist/src/classes/CommandWithSubcommands.d.ts.map +1 -0
  70. package/dist/src/classes/CommandWithSubcommands.js +21 -0
  71. package/dist/src/classes/CommandWithSubcommands.js.map +1 -0
  72. package/dist/src/classes/Embed.d.ts +61 -0
  73. package/dist/src/classes/Embed.d.ts.map +1 -0
  74. package/dist/src/classes/Embed.js +75 -0
  75. package/dist/src/classes/Embed.js.map +1 -0
  76. package/dist/src/classes/MentionableSelectMenu.d.ts +13 -0
  77. package/dist/src/classes/MentionableSelectMenu.d.ts.map +1 -0
  78. package/dist/src/classes/MentionableSelectMenu.js +13 -0
  79. package/dist/src/classes/MentionableSelectMenu.js.map +1 -0
  80. package/dist/src/classes/Modal.d.ts +21 -0
  81. package/dist/src/classes/Modal.d.ts.map +1 -0
  82. package/dist/src/classes/Modal.js +14 -0
  83. package/dist/src/classes/Modal.js.map +1 -0
  84. package/dist/src/classes/RoleSelectMenu.d.ts +13 -0
  85. package/dist/src/classes/RoleSelectMenu.d.ts.map +1 -0
  86. package/dist/src/classes/RoleSelectMenu.js +13 -0
  87. package/dist/src/classes/RoleSelectMenu.js.map +1 -0
  88. package/dist/src/classes/Row.d.ts +25 -0
  89. package/dist/src/classes/Row.d.ts.map +1 -0
  90. package/dist/src/classes/Row.js +40 -0
  91. package/dist/src/classes/Row.js.map +1 -0
  92. package/dist/src/classes/StringSelectMenu.d.ts +13 -0
  93. package/dist/src/classes/StringSelectMenu.d.ts.map +1 -0
  94. package/dist/src/classes/StringSelectMenu.js +12 -0
  95. package/dist/src/classes/StringSelectMenu.js.map +1 -0
  96. package/dist/src/classes/TextInput.d.ts +40 -0
  97. package/dist/src/classes/TextInput.d.ts.map +1 -0
  98. package/dist/src/classes/TextInput.js +44 -0
  99. package/dist/src/classes/TextInput.js.map +1 -0
  100. package/dist/src/classes/UserSelectMenu.d.ts +13 -0
  101. package/dist/src/classes/UserSelectMenu.d.ts.map +1 -0
  102. package/dist/src/classes/UserSelectMenu.js +13 -0
  103. package/dist/src/classes/UserSelectMenu.js.map +1 -0
  104. package/dist/src/factories/channelFactory.d.ts +13 -0
  105. package/dist/src/factories/channelFactory.d.ts.map +1 -0
  106. package/dist/src/factories/channelFactory.js +39 -0
  107. package/dist/src/factories/channelFactory.js.map +1 -0
  108. package/dist/src/index.d.ts +55 -0
  109. package/dist/src/index.d.ts.map +1 -0
  110. package/dist/src/index.js +61 -0
  111. package/dist/src/index.js.map +1 -0
  112. package/dist/src/internals/AutocompleteInteraction.d.ts +33 -0
  113. package/dist/src/internals/AutocompleteInteraction.d.ts.map +1 -0
  114. package/dist/src/internals/AutocompleteInteraction.js +61 -0
  115. package/dist/src/internals/AutocompleteInteraction.js.map +1 -0
  116. package/dist/src/internals/ButtonInteraction.d.ts +9 -0
  117. package/dist/src/internals/ButtonInteraction.d.ts.map +1 -0
  118. package/dist/src/internals/ButtonInteraction.js +18 -0
  119. package/dist/src/internals/ButtonInteraction.js.map +1 -0
  120. package/dist/src/internals/ChannelSelectMenuInteraction.d.ts +8 -0
  121. package/dist/src/internals/ChannelSelectMenuInteraction.d.ts.map +1 -0
  122. package/dist/src/internals/ChannelSelectMenuInteraction.js +11 -0
  123. package/dist/src/internals/ChannelSelectMenuInteraction.js.map +1 -0
  124. package/dist/src/internals/CommandHandler.d.ts +12 -0
  125. package/dist/src/internals/CommandHandler.d.ts.map +1 -0
  126. package/dist/src/internals/CommandHandler.js +89 -0
  127. package/dist/src/internals/CommandHandler.js.map +1 -0
  128. package/dist/src/internals/CommandInteraction.d.ts +16 -0
  129. package/dist/src/internals/CommandInteraction.d.ts.map +1 -0
  130. package/dist/src/internals/CommandInteraction.js +23 -0
  131. package/dist/src/internals/CommandInteraction.js.map +1 -0
  132. package/dist/src/internals/ComponentHandler.d.ts +17 -0
  133. package/dist/src/internals/ComponentHandler.d.ts.map +1 -0
  134. package/dist/src/internals/ComponentHandler.js +75 -0
  135. package/dist/src/internals/ComponentHandler.js.map +1 -0
  136. package/dist/src/internals/FieldsHandler.d.ts +27 -0
  137. package/dist/src/internals/FieldsHandler.d.ts.map +1 -0
  138. package/dist/src/internals/FieldsHandler.js +37 -0
  139. package/dist/src/internals/FieldsHandler.js.map +1 -0
  140. package/dist/src/internals/MentionableSelectMenuInteraction.d.ts +9 -0
  141. package/dist/src/internals/MentionableSelectMenuInteraction.d.ts.map +1 -0
  142. package/dist/src/internals/MentionableSelectMenuInteraction.js +15 -0
  143. package/dist/src/internals/MentionableSelectMenuInteraction.js.map +1 -0
  144. package/dist/src/internals/ModalHandler.d.ts +17 -0
  145. package/dist/src/internals/ModalHandler.d.ts.map +1 -0
  146. package/dist/src/internals/ModalHandler.js +25 -0
  147. package/dist/src/internals/ModalHandler.js.map +1 -0
  148. package/dist/src/internals/ModalInteraction.d.ts +22 -0
  149. package/dist/src/internals/ModalInteraction.d.ts.map +1 -0
  150. package/dist/src/internals/ModalInteraction.js +42 -0
  151. package/dist/src/internals/ModalInteraction.js.map +1 -0
  152. package/dist/src/internals/OptionsHandler.d.ts +82 -0
  153. package/dist/src/internals/OptionsHandler.d.ts.map +1 -0
  154. package/dist/src/internals/OptionsHandler.js +127 -0
  155. package/dist/src/internals/OptionsHandler.js.map +1 -0
  156. package/dist/src/internals/RoleSelectMenuInteraction.d.ts +9 -0
  157. package/dist/src/internals/RoleSelectMenuInteraction.d.ts.map +1 -0
  158. package/dist/src/internals/RoleSelectMenuInteraction.js +14 -0
  159. package/dist/src/internals/RoleSelectMenuInteraction.js.map +1 -0
  160. package/dist/src/internals/StringSelectMenuInteraction.d.ts +9 -0
  161. package/dist/src/internals/StringSelectMenuInteraction.d.ts.map +1 -0
  162. package/dist/src/internals/StringSelectMenuInteraction.js +14 -0
  163. package/dist/src/internals/StringSelectMenuInteraction.js.map +1 -0
  164. package/dist/src/internals/UserSelectMenuInteraction.d.ts +9 -0
  165. package/dist/src/internals/UserSelectMenuInteraction.d.ts.map +1 -0
  166. package/dist/src/internals/UserSelectMenuInteraction.js +14 -0
  167. package/dist/src/internals/UserSelectMenuInteraction.js.map +1 -0
  168. package/dist/src/plugins/linked-roles/LinkedRoles.d.ts +49 -0
  169. package/dist/src/plugins/linked-roles/LinkedRoles.d.ts.map +1 -0
  170. package/dist/src/plugins/linked-roles/LinkedRoles.js +164 -0
  171. package/dist/src/plugins/linked-roles/LinkedRoles.js.map +1 -0
  172. package/dist/src/plugins/linked-roles/index.d.ts +3 -0
  173. package/dist/src/plugins/linked-roles/index.d.ts.map +1 -0
  174. package/dist/src/plugins/linked-roles/index.js +3 -0
  175. package/dist/src/plugins/linked-roles/index.js.map +1 -0
  176. package/dist/src/plugins/linked-roles/types.d.ts +88 -0
  177. package/dist/src/plugins/linked-roles/types.d.ts.map +1 -0
  178. package/dist/src/plugins/linked-roles/types.js +39 -0
  179. package/dist/src/plugins/linked-roles/types.js.map +1 -0
  180. package/dist/src/structures/DmChannel.d.ts +19 -0
  181. package/dist/src/structures/DmChannel.d.ts.map +1 -0
  182. package/dist/src/structures/DmChannel.js +25 -0
  183. package/dist/src/structures/DmChannel.js.map +1 -0
  184. package/dist/src/structures/GroupDmChannel.d.ts +65 -0
  185. package/dist/src/structures/GroupDmChannel.d.ts.map +1 -0
  186. package/dist/src/structures/GroupDmChannel.js +116 -0
  187. package/dist/src/structures/GroupDmChannel.js.map +1 -0
  188. package/dist/src/structures/Guild.d.ts +77 -0
  189. package/dist/src/structures/Guild.d.ts.map +1 -0
  190. package/dist/src/structures/Guild.js +156 -0
  191. package/dist/src/structures/Guild.js.map +1 -0
  192. package/dist/src/structures/GuildAnnouncementChannel.d.ts +11 -0
  193. package/dist/src/structures/GuildAnnouncementChannel.d.ts.map +1 -0
  194. package/dist/src/structures/GuildAnnouncementChannel.js +15 -0
  195. package/dist/src/structures/GuildAnnouncementChannel.js.map +1 -0
  196. package/dist/src/structures/GuildCategoryChannel.d.ts +13 -0
  197. package/dist/src/structures/GuildCategoryChannel.d.ts.map +1 -0
  198. package/dist/src/structures/GuildCategoryChannel.js +13 -0
  199. package/dist/src/structures/GuildCategoryChannel.js.map +1 -0
  200. package/dist/src/structures/GuildForumChannel.d.ts +14 -0
  201. package/dist/src/structures/GuildForumChannel.d.ts.map +1 -0
  202. package/dist/src/structures/GuildForumChannel.js +15 -0
  203. package/dist/src/structures/GuildForumChannel.js.map +1 -0
  204. package/dist/src/structures/GuildMediaChannel.d.ts +9 -0
  205. package/dist/src/structures/GuildMediaChannel.d.ts.map +1 -0
  206. package/dist/src/structures/GuildMediaChannel.js +7 -0
  207. package/dist/src/structures/GuildMediaChannel.js.map +1 -0
  208. package/dist/src/structures/GuildMember.d.ts +111 -0
  209. package/dist/src/structures/GuildMember.d.ts.map +1 -0
  210. package/dist/src/structures/GuildMember.js +224 -0
  211. package/dist/src/structures/GuildMember.js.map +1 -0
  212. package/dist/src/structures/GuildStageOrVoiceChannel.d.ts +31 -0
  213. package/dist/src/structures/GuildStageOrVoiceChannel.d.ts.map +1 -0
  214. package/dist/src/structures/GuildStageOrVoiceChannel.js +43 -0
  215. package/dist/src/structures/GuildStageOrVoiceChannel.js.map +1 -0
  216. package/dist/src/structures/GuildTextChannel.d.ts +15 -0
  217. package/dist/src/structures/GuildTextChannel.d.ts.map +1 -0
  218. package/dist/src/structures/GuildTextChannel.js +20 -0
  219. package/dist/src/structures/GuildTextChannel.js.map +1 -0
  220. package/dist/src/structures/GuildThreadChannel.d.ts +90 -0
  221. package/dist/src/structures/GuildThreadChannel.d.ts.map +1 -0
  222. package/dist/src/structures/GuildThreadChannel.js +165 -0
  223. package/dist/src/structures/GuildThreadChannel.js.map +1 -0
  224. package/dist/src/structures/Message.d.ts +153 -0
  225. package/dist/src/structures/Message.d.ts.map +1 -0
  226. package/dist/src/structures/Message.js +296 -0
  227. package/dist/src/structures/Message.js.map +1 -0
  228. package/dist/src/structures/Role.d.ts +108 -0
  229. package/dist/src/structures/Role.d.ts.map +1 -0
  230. package/dist/src/structures/Role.js +220 -0
  231. package/dist/src/structures/Role.js.map +1 -0
  232. package/dist/src/structures/User.d.ts +82 -0
  233. package/dist/src/structures/User.d.ts.map +1 -0
  234. package/dist/src/structures/User.js +166 -0
  235. package/dist/src/structures/User.js.map +1 -0
  236. package/dist/src/types.d.ts +37 -0
  237. package/dist/src/types.d.ts.map +1 -0
  238. package/dist/src/types.js +2 -0
  239. package/dist/src/types.js.map +1 -0
  240. package/dist/src/utils.d.ts +22 -0
  241. package/dist/src/utils.d.ts.map +1 -0
  242. package/dist/src/utils.js +79 -0
  243. package/dist/src/utils.js.map +1 -0
  244. package/dist/tsconfig.tsbuildinfo +1 -0
  245. package/package.json +34 -0
@@ -0,0 +1,82 @@
1
+ import { type APIDMChannel, type APIUser, type UserFlags } from "discord-api-types/v10";
2
+ import { Base } from "../abstracts/Base.js";
3
+ import type { Client } from "../classes/Client.js";
4
+ import type { MessagePayload } from "../types.js";
5
+ import type { IfPartial } from "../utils.js";
6
+ import { Message } from "./Message.js";
7
+ export declare class User<IsPartial extends boolean = false> extends Base {
8
+ constructor(client: Client, rawDataOrId: IsPartial extends true ? string : APIUser);
9
+ private rawData;
10
+ private setData;
11
+ /**
12
+ * The ID of the user
13
+ */
14
+ readonly id: string;
15
+ /**
16
+ * Whether the user is a partial user (meaning it does not have all the data).
17
+ * If this is true, you should use {@link User.fetch} to get the full data of the user.
18
+ */
19
+ get partial(): IsPartial;
20
+ /**
21
+ * The username of the user.
22
+ */
23
+ get username(): IfPartial<IsPartial, string>;
24
+ /**
25
+ * The global name of the user.
26
+ */
27
+ get globalName(): IfPartial<IsPartial, string | null>;
28
+ /**
29
+ * The discriminator of the user.
30
+ */
31
+ get discriminator(): IfPartial<IsPartial, string>;
32
+ /**
33
+ * Is this user a bot?
34
+ */
35
+ get bot(): IfPartial<IsPartial, boolean>;
36
+ /**
37
+ * Is this user a system user?
38
+ */
39
+ get system(): IfPartial<IsPartial, boolean>;
40
+ /**
41
+ * The public flags of the user. (Bitfield)
42
+ * @see https://discord.com/developers/docs/resources/user#user-object-user-flags
43
+ */
44
+ get flags(): IfPartial<IsPartial, UserFlags | undefined>;
45
+ /**
46
+ * The avatar hash of the user.
47
+ * You can use {@link User.avatarUrl} to get the URL of the avatar.
48
+ */
49
+ get avatar(): IfPartial<IsPartial, string | null>;
50
+ /**
51
+ * Get the URL of the user's avatar
52
+ */
53
+ get avatarUrl(): IfPartial<IsPartial, string | null>;
54
+ /**
55
+ * The banner hash of the user.
56
+ * You can use {@link User.bannerUrl} to get the URL of the banner.
57
+ */
58
+ get banner(): IfPartial<IsPartial, string | null>;
59
+ /**
60
+ * Get the URL of the user's banner
61
+ */
62
+ get bannerUrl(): IfPartial<IsPartial, string | null>;
63
+ /**
64
+ * The accent color of the user.
65
+ */
66
+ get accentColor(): IfPartial<IsPartial, number | null>;
67
+ /**
68
+ * Fetch updated data for this user.
69
+ * If the user is partial, this will fetch all the data for the user and populate the fields.
70
+ * If the user is not partial, all fields will be updated with new values from Discord.
71
+ */
72
+ fetch(): Promise<void>;
73
+ /**
74
+ * Instantiate a new DM channel with this user.
75
+ */
76
+ createDm(userId: string): Promise<APIDMChannel>;
77
+ /**
78
+ * Send a message to this user.
79
+ */
80
+ send(data: MessagePayload): Promise<Message<false>>;
81
+ }
82
+ //# sourceMappingURL=User.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"User.d.ts","sourceRoot":"","sources":["../../../src/structures/User.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,YAAY,EAEjB,KAAK,OAAO,EAEZ,KAAK,SAAS,EACd,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAC3C,OAAO,KAAK,EAAE,MAAM,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,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC,CAGhD;IAED;;OAEG;IACH,IAAI,SAAS,IAAI,SAAS,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC,CAInD;IAED;;OAEG;IACH,IAAI,WAAW,IAAI,SAAS,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC,CAGrD;IAED;;;;OAIG;IACG,KAAK;IASX;;OAEG;IACG,QAAQ,CAAC,MAAM,EAAE,MAAM;IAS7B;;OAEG;IACG,IAAI,CAAC,IAAI,EAAE,cAAc;CAU/B"}
@@ -0,0 +1,166 @@
1
+ import { Routes } from "discord-api-types/v10";
2
+ import { Base } from "../abstracts/Base.js";
3
+ import { serializePayload } from "../utils.js";
4
+ import { Message } from "./Message.js";
5
+ export class User extends Base {
6
+ constructor(client, rawDataOrId) {
7
+ super(client);
8
+ if (typeof rawDataOrId === "string") {
9
+ this.id = rawDataOrId;
10
+ }
11
+ else {
12
+ this.rawData = rawDataOrId;
13
+ this.id = rawDataOrId.id;
14
+ this.setData(rawDataOrId);
15
+ }
16
+ }
17
+ rawData = null;
18
+ setData(data) {
19
+ if (!data)
20
+ throw new Error("Cannot set data without having data... smh");
21
+ this.rawData = data;
22
+ }
23
+ // private setField(key: keyof APIUser, value: unknown) {
24
+ // if (!this.rawData) throw new Error("Cannot set field without having data... smh")
25
+ // Reflect.set(this.rawData, key, value)
26
+ // }
27
+ /**
28
+ * The ID of the user
29
+ */
30
+ id;
31
+ /**
32
+ * Whether the user is a partial user (meaning it does not have all the data).
33
+ * If this is true, you should use {@link User.fetch} to get the full data of the user.
34
+ */
35
+ get partial() {
36
+ return (this.rawData === null);
37
+ }
38
+ /**
39
+ * The username of the user.
40
+ */
41
+ get username() {
42
+ if (!this.rawData)
43
+ return undefined;
44
+ return this.rawData.username;
45
+ }
46
+ /**
47
+ * The global name of the user.
48
+ */
49
+ get globalName() {
50
+ if (!this.rawData)
51
+ return undefined;
52
+ return this.rawData.global_name;
53
+ }
54
+ /**
55
+ * The discriminator of the user.
56
+ */
57
+ get discriminator() {
58
+ if (!this.rawData)
59
+ return undefined;
60
+ return this.rawData.discriminator;
61
+ }
62
+ /**
63
+ * Is this user a bot?
64
+ */
65
+ get bot() {
66
+ if (!this.rawData)
67
+ return undefined;
68
+ return this.rawData.bot ?? false;
69
+ }
70
+ /**
71
+ * Is this user a system user?
72
+ */
73
+ get system() {
74
+ if (!this.rawData)
75
+ return undefined;
76
+ return this.rawData.system ?? false;
77
+ }
78
+ /**
79
+ * The public flags of the user. (Bitfield)
80
+ * @see https://discord.com/developers/docs/resources/user#user-object-user-flags
81
+ */
82
+ get flags() {
83
+ if (!this.rawData)
84
+ return undefined;
85
+ return this.rawData.public_flags;
86
+ }
87
+ /**
88
+ * The avatar hash of the user.
89
+ * You can use {@link User.avatarUrl} to get the URL of the avatar.
90
+ */
91
+ get avatar() {
92
+ if (!this.rawData)
93
+ return undefined;
94
+ return this.rawData.avatar;
95
+ }
96
+ /**
97
+ * Get the URL of the user's avatar
98
+ */
99
+ get avatarUrl() {
100
+ if (!this.rawData)
101
+ return undefined;
102
+ if (!this.avatar)
103
+ return null;
104
+ return `https://cdn.discordapp.com/avatars/${this.id}/${this.avatar}.png`;
105
+ }
106
+ /**
107
+ * The banner hash of the user.
108
+ * You can use {@link User.bannerUrl} to get the URL of the banner.
109
+ */
110
+ get banner() {
111
+ if (!this.rawData)
112
+ return undefined;
113
+ return this.rawData.banner ?? null;
114
+ }
115
+ /**
116
+ * Get the URL of the user's banner
117
+ */
118
+ get bannerUrl() {
119
+ if (!this.rawData)
120
+ return undefined;
121
+ if (!this.banner)
122
+ return null;
123
+ return `https://cdn.discordapp.com/banners/${this.id}/${this.banner}.png`;
124
+ }
125
+ /**
126
+ * The accent color of the user.
127
+ */
128
+ get accentColor() {
129
+ if (!this.rawData)
130
+ return undefined;
131
+ return this.rawData.accent_color ?? null;
132
+ }
133
+ /**
134
+ * Fetch updated data for this user.
135
+ * If the user is partial, this will fetch all the data for the user and populate the fields.
136
+ * If the user is not partial, all fields will be updated with new values from Discord.
137
+ */
138
+ async fetch() {
139
+ const newData = (await this.client.rest.get(Routes.user(this.id)));
140
+ if (!newData)
141
+ throw new Error(`User ${this.id} not found`);
142
+ this.setData(newData);
143
+ }
144
+ /**
145
+ * Instantiate a new DM channel with this user.
146
+ */
147
+ async createDm(userId) {
148
+ const dmChannel = (await this.client.rest.post(Routes.userChannels(), {
149
+ body: {
150
+ recipient_id: userId
151
+ }
152
+ }));
153
+ return dmChannel;
154
+ }
155
+ /**
156
+ * Send a message to this user.
157
+ */
158
+ async send(data) {
159
+ const dmChannel = await this.createDm(this.id);
160
+ const message = (await this.client.rest.post(Routes.channelMessages(dmChannel.id), {
161
+ body: serializePayload(data)
162
+ }));
163
+ return new Message(this.client, message);
164
+ }
165
+ }
166
+ //# sourceMappingURL=User.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"User.js","sourceRoot":"","sources":["../../../src/structures/User.ts"],"names":[],"mappings":"AAAA,OAAO,EAIN,MAAM,EAEN,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAI3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAEtC,MAAM,OAAO,IAAwC,SAAQ,IAAI;IAChE,YACC,MAAc,EACd,WAAsD;QAEtD,KAAK,CAAC,MAAM,CAAC,CAAA;QACb,IAAI,OAAO,WAAW,KAAK,QAAQ,EAAE,CAAC;YACrC,IAAI,CAAC,EAAE,GAAG,WAAW,CAAA;QACtB,CAAC;aAAM,CAAC;YACP,IAAI,CAAC,OAAO,GAAG,WAAW,CAAA;YAC1B,IAAI,CAAC,EAAE,GAAG,WAAW,CAAC,EAAE,CAAA;YACxB,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,CAAA;QAC1B,CAAC;IACF,CAAC;IAEO,OAAO,GAAmB,IAA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MAAM,IAAI,KAAK,CAAC,QAAQ,IAAI,CAAC,EAAE,YAAY,CAAC,CAAA;QAE1D,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAA;IACtB,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,QAAQ,CAAC,MAAc;QAC5B,MAAM,SAAS,GAAG,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,YAAY,EAAE,EAAE;YACrE,IAAI,EAAE;gBACL,YAAY,EAAE,MAAM;aACpB;SACD,CAAC,CAAiB,CAAA;QACnB,OAAO,SAAS,CAAA;IACjB,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,IAAI,CAAC,IAAoB;QAC9B,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;QAC9C,MAAM,OAAO,GAAG,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAC3C,MAAM,CAAC,eAAe,CAAC,SAAS,CAAC,EAAE,CAAC,EACpC;YACC,IAAI,EAAE,gBAAgB,CAAC,IAAI,CAAC;SAC5B,CACD,CAAe,CAAA;QAChB,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACzC,CAAC;CACD"}
@@ -0,0 +1,37 @@
1
+ import type { Embed } from "./classes/Embed.js";
2
+ import type { Row } from "./classes/Row.js";
3
+ /**
4
+ * The data that is sent to Discord when sending a message.
5
+ * If you pass just a string, it will be treated as the content of the message.
6
+ */
7
+ export type MessagePayload = {
8
+ /**
9
+ * The content of the message
10
+ */
11
+ content?: string;
12
+ /**
13
+ * The embeds of the message
14
+ */
15
+ embeds?: Embed[];
16
+ /**
17
+ * The components to send in the message, listed in rows
18
+ */
19
+ components?: Row[];
20
+ /**
21
+ * The settings for which mentions are allowed in the message
22
+ */
23
+ allowedMentions?: {
24
+ parse?: ["roles", "users", "everyone"];
25
+ roles?: string[];
26
+ users?: string[];
27
+ };
28
+ /**
29
+ * The flags for the message
30
+ */
31
+ flags?: number;
32
+ /**
33
+ * Whether the message should be TTS
34
+ */
35
+ tts?: boolean;
36
+ } | string;
37
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAA;AAC/C,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAA;AAE3C;;;GAGG;AACH,MAAM,MAAM,cAAc,GACvB;IACA;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB;;OAEG;IACH,MAAM,CAAC,EAAE,KAAK,EAAE,CAAA;IAChB;;OAEG;IACH,UAAU,CAAC,EAAE,GAAG,EAAE,CAAA;IAClB;;OAEG;IACH,eAAe,CAAC,EAAE;QACjB,KAAK,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,UAAU,CAAC,CAAA;QACtC,KAAK,CAAC,EAAE,MAAM,EAAE,CAAA;QAChB,KAAK,CAAC,EAAE,MAAM,EAAE,CAAA;KAChB,CAAA;IACD;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;;OAEG;IACH,GAAG,CAAC,EAAE,OAAO,CAAA;CACZ,GACD,MAAM,CAAA"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,22 @@
1
+ export type IfPartial<T, U, V = U | undefined> = T extends true ? V : U;
2
+ import type { MessagePayload } from "./types.js";
3
+ export declare const splitCustomId: (customId: string) => [string, Record<string, string>];
4
+ export declare const subtleCrypto: SubtleCrypto;
5
+ export declare function valueToUint8Array(value: Uint8Array | ArrayBuffer | Buffer | string, format?: string): Uint8Array;
6
+ export declare function concatUint8Arrays(arr1: Uint8Array, arr2: Uint8Array): Uint8Array;
7
+ export declare const serializePayload: (payload: MessagePayload, defaultEphemeral?: boolean) => {
8
+ embeds: import("discord-api-types/v10").APIEmbed[] | undefined;
9
+ components: import("discord-api-types/v10").APIActionRowComponent<import("discord-api-types/v10").APIActionRowComponentTypes>[] | undefined;
10
+ content?: string;
11
+ allowedMentions?: {
12
+ parse?: ["roles", "users", "everyone"];
13
+ roles?: string[];
14
+ users?: string[];
15
+ };
16
+ flags?: number;
17
+ tts?: boolean;
18
+ } | {
19
+ content: string;
20
+ flags: number | undefined;
21
+ };
22
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,SAAS,IAAI,CAAC,SAAS,IAAI,GAAG,CAAC,GAAG,CAAC,CAAA;AACvE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AAEhD,eAAO,MAAM,aAAa,aACf,MAAM,KACd,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAUjC,CAAA;AAsBD,eAAO,MAAM,YAAY,cAAoB,CAAA;AAE7C,wBAAgB,iBAAiB,CAChC,KAAK,EAAE,UAAU,GAAG,WAAW,GAAG,MAAM,GAAG,MAAM,EACjD,MAAM,CAAC,EAAE,MAAM,GACb,UAAU,CA8BZ;AAED,wBAAgB,iBAAiB,CAChC,IAAI,EAAE,UAAU,EAChB,IAAI,EAAE,UAAU,GACd,UAAU,CAKZ;AAED,eAAO,MAAM,gBAAgB,YACnB,cAAc;;;;;aAjEoB,CAAC;aAG5C,CAAD;aAAoB,CAAC;;;;;;;CA6EpB,CAAA"}
@@ -0,0 +1,79 @@
1
+ export const splitCustomId = (customId) => {
2
+ const [id, ...args] = customId.split(":");
3
+ if (!id)
4
+ throw new Error("Invalid custom ID was provided");
5
+ const data = Object.fromEntries(args.map((arg) => {
6
+ const [key, value] = arg.split("=");
7
+ return [key, value];
8
+ }));
9
+ return [id, data];
10
+ };
11
+ // Used from https://github.com/discord/discord-interactions-js
12
+ function getSubtleCrypto() {
13
+ if (typeof window !== "undefined" && window.crypto) {
14
+ return window.crypto.subtle;
15
+ }
16
+ if (typeof globalThis !== "undefined" && globalThis.crypto) {
17
+ return globalThis.crypto.subtle;
18
+ }
19
+ if (typeof crypto !== "undefined") {
20
+ return crypto.subtle;
21
+ }
22
+ if (typeof require === "function") {
23
+ const cryptoPackage = "node:crypto";
24
+ const crypto = require(cryptoPackage);
25
+ return crypto.webcrypto.subtle;
26
+ }
27
+ throw new Error("No Web Crypto API implementation found");
28
+ }
29
+ export const subtleCrypto = getSubtleCrypto();
30
+ export function valueToUint8Array(value, format) {
31
+ if (value == null) {
32
+ return new Uint8Array();
33
+ }
34
+ if (typeof value === "string") {
35
+ if (format === "hex") {
36
+ const matches = value.match(/.{1,2}/g);
37
+ if (matches == null) {
38
+ throw new Error("Value is not a valid hex string");
39
+ }
40
+ const hexVal = matches.map((byte) => Number.parseInt(byte, 16));
41
+ return new Uint8Array(hexVal);
42
+ }
43
+ return new TextEncoder().encode(value);
44
+ }
45
+ try {
46
+ if (Buffer.isBuffer(value)) {
47
+ return new Uint8Array(value);
48
+ }
49
+ }
50
+ catch (_) { }
51
+ if (value instanceof ArrayBuffer) {
52
+ return new Uint8Array(value);
53
+ }
54
+ if (value instanceof Uint8Array) {
55
+ return value;
56
+ }
57
+ throw new Error("Unrecognized value type, must be one of: string, Buffer, ArrayBuffer, Uint8Array");
58
+ }
59
+ export function concatUint8Arrays(arr1, arr2) {
60
+ const merged = new Uint8Array(arr1.length + arr2.length);
61
+ merged.set(arr1);
62
+ merged.set(arr2, arr1.length);
63
+ return merged;
64
+ }
65
+ export const serializePayload = (payload, defaultEphemeral = false) => {
66
+ if (typeof payload === "string") {
67
+ return { content: payload, flags: defaultEphemeral ? 64 : undefined };
68
+ }
69
+ const data = {
70
+ ...payload,
71
+ embeds: payload.embeds?.map((embed) => embed.serialize()),
72
+ components: payload.components?.map((row) => row.serialize())
73
+ };
74
+ if (defaultEphemeral) {
75
+ data.flags = 64;
76
+ }
77
+ return data;
78
+ };
79
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,MAAM,aAAa,GAAG,CAC5B,QAAgB,EACmB,EAAE;IACrC,MAAM,CAAC,EAAE,EAAE,GAAG,IAAI,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;IACzC,IAAI,CAAC,EAAE;QAAE,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAA;IAC1D,MAAM,IAAI,GAAG,MAAM,CAAC,WAAW,CAC9B,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE;QAChB,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;QACnC,OAAO,CAAC,GAAG,EAAE,KAAK,CAAC,CAAA;IACpB,CAAC,CAAC,CACF,CAAA;IACD,OAAO,CAAC,EAAE,EAAE,IAAI,CAAC,CAAA;AAClB,CAAC,CAAA;AAED,+DAA+D;AAE/D,SAAS,eAAe;IACvB,IAAI,OAAO,MAAM,KAAK,WAAW,IAAI,MAAM,CAAC,MAAM,EAAE,CAAC;QACpD,OAAO,MAAM,CAAC,MAAM,CAAC,MAAM,CAAA;IAC5B,CAAC;IACD,IAAI,OAAO,UAAU,KAAK,WAAW,IAAI,UAAU,CAAC,MAAM,EAAE,CAAC;QAC5D,OAAO,UAAU,CAAC,MAAM,CAAC,MAAM,CAAA;IAChC,CAAC;IACD,IAAI,OAAO,MAAM,KAAK,WAA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