@buape/carbon 0.2.0 → 0.3.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 (267) hide show
  1. package/dist/package.json +7 -2
  2. package/dist/src/abstracts/BaseComponentInteraction.d.ts +6 -1
  3. package/dist/src/abstracts/BaseComponentInteraction.d.ts.map +1 -1
  4. package/dist/src/abstracts/BaseComponentInteraction.js +12 -0
  5. package/dist/src/abstracts/BaseComponentInteraction.js.map +1 -1
  6. package/dist/src/abstracts/BaseInteraction.d.ts +4 -0
  7. package/dist/src/abstracts/BaseInteraction.d.ts.map +1 -1
  8. package/dist/src/abstracts/BaseInteraction.js +4 -0
  9. package/dist/src/abstracts/BaseInteraction.js.map +1 -1
  10. package/dist/src/classes/Client.d.ts.map +1 -1
  11. package/dist/src/classes/Client.js +21 -11
  12. package/dist/src/classes/Client.js.map +1 -1
  13. package/dist/src/internals/AutocompleteInteraction.d.ts +1 -1
  14. package/dist/src/internals/FieldsHandler.d.ts +27 -0
  15. package/dist/src/internals/FieldsHandler.d.ts.map +1 -0
  16. package/dist/src/internals/FieldsHandler.js +37 -0
  17. package/dist/src/internals/FieldsHandler.js.map +1 -0
  18. package/dist/src/internals/ModalInteraction.d.ts +3 -4
  19. package/dist/src/internals/ModalInteraction.d.ts.map +1 -1
  20. package/dist/src/internals/ModalInteraction.js +3 -10
  21. package/dist/src/internals/ModalInteraction.js.map +1 -1
  22. package/dist/src/internals/OptionsHandler.d.ts +33 -17
  23. package/dist/src/internals/OptionsHandler.d.ts.map +1 -1
  24. package/dist/src/internals/OptionsHandler.js +52 -58
  25. package/dist/src/internals/OptionsHandler.js.map +1 -1
  26. package/dist/src/utils.d.ts +3 -0
  27. package/dist/src/utils.d.ts.map +1 -1
  28. package/dist/src/utils.js +54 -0
  29. package/dist/src/utils.js.map +1 -1
  30. package/dist/tsconfig.tsbuildinfo +1 -1
  31. package/package.json +6 -1
  32. package/.turbo/turbo-build.log +0 -5
  33. package/.turbo/turbo-dev.log +0 -8
  34. package/.turbo/turbo-docs.log +0 -12
  35. package/CHANGELOG.md +0 -44
  36. package/dist/src/abstracts/ButtonInteraction.d.ts +0 -8
  37. package/dist/src/abstracts/ButtonInteraction.d.ts.map +0 -1
  38. package/dist/src/abstracts/ButtonInteraction.js +0 -18
  39. package/dist/src/abstracts/ButtonInteraction.js.map +0 -1
  40. package/dist/src/abstracts/ChannelSelectMenuInteraction.d.ts +0 -7
  41. package/dist/src/abstracts/ChannelSelectMenuInteraction.d.ts.map +0 -1
  42. package/dist/src/abstracts/ChannelSelectMenuInteraction.js +0 -11
  43. package/dist/src/abstracts/ChannelSelectMenuInteraction.js.map +0 -1
  44. package/dist/src/abstracts/CommandHandler.d.ts +0 -6
  45. package/dist/src/abstracts/CommandHandler.d.ts.map +0 -1
  46. package/dist/src/abstracts/CommandHandler.js +0 -65
  47. package/dist/src/abstracts/CommandHandler.js.map +0 -1
  48. package/dist/src/abstracts/CommandInteraction.d.ts +0 -15
  49. package/dist/src/abstracts/CommandInteraction.d.ts.map +0 -1
  50. package/dist/src/abstracts/CommandInteraction.js +0 -60
  51. package/dist/src/abstracts/CommandInteraction.js.map +0 -1
  52. package/dist/src/abstracts/ComponentHandler.d.ts +0 -6
  53. package/dist/src/abstracts/ComponentHandler.d.ts.map +0 -1
  54. package/dist/src/abstracts/ComponentHandler.js +0 -64
  55. package/dist/src/abstracts/ComponentHandler.js.map +0 -1
  56. package/dist/src/abstracts/MentionableSelectMenuInteraction.d.ts +0 -8
  57. package/dist/src/abstracts/MentionableSelectMenuInteraction.d.ts.map +0 -1
  58. package/dist/src/abstracts/MentionableSelectMenuInteraction.js +0 -15
  59. package/dist/src/abstracts/MentionableSelectMenuInteraction.js.map +0 -1
  60. package/dist/src/abstracts/RoleSelectMenuInteraction.d.ts +0 -8
  61. package/dist/src/abstracts/RoleSelectMenuInteraction.d.ts.map +0 -1
  62. package/dist/src/abstracts/RoleSelectMenuInteraction.js +0 -14
  63. package/dist/src/abstracts/RoleSelectMenuInteraction.js.map +0 -1
  64. package/dist/src/abstracts/StringSelectMenuInteraction.d.ts +0 -8
  65. package/dist/src/abstracts/StringSelectMenuInteraction.d.ts.map +0 -1
  66. package/dist/src/abstracts/StringSelectMenuInteraction.js +0 -14
  67. package/dist/src/abstracts/StringSelectMenuInteraction.js.map +0 -1
  68. package/dist/src/abstracts/UserSelectMenuInteraction.d.ts +0 -8
  69. package/dist/src/abstracts/UserSelectMenuInteraction.d.ts.map +0 -1
  70. package/dist/src/abstracts/UserSelectMenuInteraction.js +0 -14
  71. package/dist/src/abstracts/UserSelectMenuInteraction.js.map +0 -1
  72. package/dist/src/classes/Paginator.d.ts +0 -3
  73. package/dist/src/classes/Paginator.d.ts.map +0 -1
  74. package/dist/src/classes/Paginator.js +0 -3
  75. package/dist/src/classes/Paginator.js.map +0 -1
  76. package/dist/src/internals/ComponentHandler copy.d.ts +0 -17
  77. package/dist/src/internals/ComponentHandler copy.d.ts.map +0 -1
  78. package/dist/src/internals/ComponentHandler copy.js +0 -75
  79. package/dist/src/internals/ComponentHandler copy.js.map +0 -1
  80. package/dist/src/structures/AnySelectMenu.d.ts +0 -31
  81. package/dist/src/structures/AnySelectMenu.d.ts.map +0 -1
  82. package/dist/src/structures/AnySelectMenu.js +0 -19
  83. package/dist/src/structures/AnySelectMenu.js.map +0 -1
  84. package/dist/src/structures/AnySelectMenuInteraction.d.ts +0 -12
  85. package/dist/src/structures/AnySelectMenuInteraction.d.ts.map +0 -1
  86. package/dist/src/structures/AnySelectMenuInteraction.js +0 -21
  87. package/dist/src/structures/AnySelectMenuInteraction.js.map +0 -1
  88. package/dist/src/structures/Base.d.ts +0 -10
  89. package/dist/src/structures/Base.d.ts.map +0 -1
  90. package/dist/src/structures/Base.js +0 -11
  91. package/dist/src/structures/Base.js.map +0 -1
  92. package/dist/src/structures/BaseCommand.d.ts +0 -64
  93. package/dist/src/structures/BaseCommand.d.ts.map +0 -1
  94. package/dist/src/structures/BaseCommand.js +0 -58
  95. package/dist/src/structures/BaseCommand.js.map +0 -1
  96. package/dist/src/structures/BaseComponent.d.ts +0 -34
  97. package/dist/src/structures/BaseComponent.d.ts.map +0 -1
  98. package/dist/src/structures/BaseComponent.js +0 -30
  99. package/dist/src/structures/BaseComponent.js.map +0 -1
  100. package/dist/src/structures/BaseComponentInteraction.d.ts +0 -9
  101. package/dist/src/structures/BaseComponentInteraction.d.ts.map +0 -1
  102. package/dist/src/structures/BaseComponentInteraction.js +0 -14
  103. package/dist/src/structures/BaseComponentInteraction.js.map +0 -1
  104. package/dist/src/structures/BaseInteraction.d.ts +0 -81
  105. package/dist/src/structures/BaseInteraction.d.ts.map +0 -1
  106. package/dist/src/structures/BaseInteraction.js +0 -99
  107. package/dist/src/structures/BaseInteraction.js.map +0 -1
  108. package/dist/src/structures/ButtonInteraction.d.ts +0 -8
  109. package/dist/src/structures/ButtonInteraction.d.ts.map +0 -1
  110. package/dist/src/structures/ButtonInteraction.js +0 -18
  111. package/dist/src/structures/ButtonInteraction.js.map +0 -1
  112. package/dist/src/structures/ChannelSelectMenuInteraction.d.ts +0 -7
  113. package/dist/src/structures/ChannelSelectMenuInteraction.d.ts.map +0 -1
  114. package/dist/src/structures/ChannelSelectMenuInteraction.js +0 -11
  115. package/dist/src/structures/ChannelSelectMenuInteraction.js.map +0 -1
  116. package/dist/src/structures/CommandHandler.d.ts +0 -6
  117. package/dist/src/structures/CommandHandler.d.ts.map +0 -1
  118. package/dist/src/structures/CommandHandler.js +0 -70
  119. package/dist/src/structures/CommandHandler.js.map +0 -1
  120. package/dist/src/structures/CommandInteraction.d.ts +0 -15
  121. package/dist/src/structures/CommandInteraction.d.ts.map +0 -1
  122. package/dist/src/structures/CommandInteraction.js +0 -60
  123. package/dist/src/structures/CommandInteraction.js.map +0 -1
  124. package/dist/src/structures/ComponentHandler.d.ts +0 -6
  125. package/dist/src/structures/ComponentHandler.d.ts.map +0 -1
  126. package/dist/src/structures/ComponentHandler.js +0 -64
  127. package/dist/src/structures/ComponentHandler.js.map +0 -1
  128. package/dist/src/structures/MentionableSelectMenuInteraction.d.ts +0 -8
  129. package/dist/src/structures/MentionableSelectMenuInteraction.d.ts.map +0 -1
  130. package/dist/src/structures/MentionableSelectMenuInteraction.js +0 -15
  131. package/dist/src/structures/MentionableSelectMenuInteraction.js.map +0 -1
  132. package/dist/src/structures/RoleSelectMenuInteraction.d.ts +0 -8
  133. package/dist/src/structures/RoleSelectMenuInteraction.d.ts.map +0 -1
  134. package/dist/src/structures/RoleSelectMenuInteraction.js +0 -14
  135. package/dist/src/structures/RoleSelectMenuInteraction.js.map +0 -1
  136. package/dist/src/structures/StringSelectMenuInteraction.d.ts +0 -8
  137. package/dist/src/structures/StringSelectMenuInteraction.d.ts.map +0 -1
  138. package/dist/src/structures/StringSelectMenuInteraction.js +0 -14
  139. package/dist/src/structures/StringSelectMenuInteraction.js.map +0 -1
  140. package/dist/src/structures/UserSelectMenuInteraction.d.ts +0 -8
  141. package/dist/src/structures/UserSelectMenuInteraction.d.ts.map +0 -1
  142. package/dist/src/structures/UserSelectMenuInteraction.js +0 -14
  143. package/dist/src/structures/UserSelectMenuInteraction.js.map +0 -1
  144. package/dist/src/types.d.ts +0 -31
  145. package/dist/src/types.d.ts.map +0 -1
  146. package/dist/src/types.js +0 -33
  147. package/dist/src/types.js.map +0 -1
  148. package/docs/classes/AnySelectMenu.mdx +0 -114
  149. package/docs/classes/AnySelectMenuInteraction.mdx +0 -175
  150. package/docs/classes/AutocompleteInteraction.mdx +0 -166
  151. package/docs/classes/AutocompleteOptionsHandler.mdx +0 -243
  152. package/docs/classes/BaseChannel.mdx +0 -97
  153. package/docs/classes/BaseCommand.mdx +0 -61
  154. package/docs/classes/BaseComponent.mdx +0 -55
  155. package/docs/classes/BaseComponentInteraction.mdx +0 -160
  156. package/docs/classes/BaseGuildChannel.mdx +0 -262
  157. package/docs/classes/BaseGuildTextChannel.mdx +0 -360
  158. package/docs/classes/BaseInteraction.mdx +0 -137
  159. package/docs/classes/Button.mdx +0 -99
  160. package/docs/classes/ButtonInteraction.mdx +0 -155
  161. package/docs/classes/ChannelSelectMenu.mdx +0 -122
  162. package/docs/classes/ChannelSelectMenuInteraction.mdx +0 -171
  163. package/docs/classes/Client.mdx +0 -48
  164. package/docs/classes/Command.mdx +0 -111
  165. package/docs/classes/CommandHandler.mdx +0 -65
  166. package/docs/classes/CommandInteraction.mdx +0 -155
  167. package/docs/classes/CommandWithSubcommandGroups.mdx +0 -73
  168. package/docs/classes/CommandWithSubcommands.mdx +0 -76
  169. package/docs/classes/ComponentHandler.mdx +0 -49
  170. package/docs/classes/DmChannel.mdx +0 -118
  171. package/docs/classes/GroupDmChannel.mdx +0 -197
  172. package/docs/classes/Guild.mdx +0 -157
  173. package/docs/classes/GuildAnnouncementChannel.mdx +0 -377
  174. package/docs/classes/GuildCategoryChannel.mdx +0 -272
  175. package/docs/classes/GuildForumChannel.mdx +0 -333
  176. package/docs/classes/GuildMediaChannel.mdx +0 -327
  177. package/docs/classes/GuildStageChannel.mdx +0 -276
  178. package/docs/classes/GuildStageOrVoiceChannel.mdx +0 -292
  179. package/docs/classes/GuildTextChannel.mdx +0 -367
  180. package/docs/classes/GuildThreadChannel.mdx +0 -425
  181. package/docs/classes/GuildThreadOnlyChannel.mdx +0 -333
  182. package/docs/classes/GuildVoiceChannel.mdx +0 -276
  183. package/docs/classes/LinkButton.mdx +0 -84
  184. package/docs/classes/MentionableSelectMenu.mdx +0 -120
  185. package/docs/classes/MentionableSelectMenuInteraction.mdx +0 -171
  186. package/docs/classes/Message.mdx +0 -126
  187. package/docs/classes/OptionsHandler.mdx +0 -203
  188. package/docs/classes/PremiumButton.mdx +0 -84
  189. package/docs/classes/Role.mdx +0 -228
  190. package/docs/classes/RoleSelectMenu.mdx +0 -120
  191. package/docs/classes/RoleSelectMenuInteraction.mdx +0 -171
  192. package/docs/classes/Row.mdx +0 -88
  193. package/docs/classes/StringSelectMenu.mdx +0 -120
  194. package/docs/classes/StringSelectMenuInteraction.mdx +0 -171
  195. package/docs/classes/User.mdx +0 -119
  196. package/docs/classes/UserSelectMenu.mdx +0 -120
  197. package/docs/classes/UserSelectMenuInteraction.mdx +0 -171
  198. package/docs/enumerations/ClientMode.mdx +0 -16
  199. package/docs/functions/channelFactory.mdx +0 -16
  200. package/docs/index.mdx +0 -83
  201. package/docs/type-aliases/AnySelectMenuComponentType.mdx +0 -5
  202. package/docs/type-aliases/ClientOptions.mdx +0 -20
  203. package/docs/type-aliases/CommandOptions.mdx +0 -5
  204. package/docs/type-aliases/ComponentAdditionalData.mdx +0 -9
  205. package/docs/type-aliases/InteractionFileData.mdx +0 -15
  206. package/docs/type-aliases/InteractionReplyData.mdx +0 -14
  207. package/docs/type-aliases/InteractionReplyOptions.mdx +0 -13
  208. package/docs/type-aliases/RawOptions.mdx +0 -9
  209. package/docs/type-aliases/meta.json +0 -3
  210. package/src/README.md +0 -7
  211. package/src/abstracts/AnySelectMenu.ts +0 -63
  212. package/src/abstracts/AnySelectMenuInteraction.ts +0 -29
  213. package/src/abstracts/Base.ts +0 -12
  214. package/src/abstracts/BaseChannel.ts +0 -73
  215. package/src/abstracts/BaseCommand.ts +0 -89
  216. package/src/abstracts/BaseComponent.ts +0 -49
  217. package/src/abstracts/BaseComponentInteraction.ts +0 -19
  218. package/src/abstracts/BaseGuildChannel.ts +0 -152
  219. package/src/abstracts/BaseGuildTextChannel.ts +0 -77
  220. package/src/abstracts/BaseInteraction.ts +0 -209
  221. package/src/abstracts/GuildThreadOnlyChannel.ts +0 -71
  222. package/src/classes/Button.ts +0 -95
  223. package/src/classes/ChannelSelectMenu.ts +0 -21
  224. package/src/classes/Client.ts +0 -277
  225. package/src/classes/Command.ts +0 -53
  226. package/src/classes/CommandWithSubcommandGroups.ts +0 -47
  227. package/src/classes/CommandWithSubcommands.ts +0 -35
  228. package/src/classes/MentionableSelectMenu.ts +0 -19
  229. package/src/classes/Modal.ts +0 -38
  230. package/src/classes/RoleSelectMenu.ts +0 -19
  231. package/src/classes/Row.ts +0 -50
  232. package/src/classes/StringSelectMenu.ts +0 -19
  233. package/src/classes/TextInput.ts +0 -65
  234. package/src/classes/UserSelectMenu.ts +0 -19
  235. package/src/factories/channelFactory.ts +0 -43
  236. package/src/index.ts +0 -62
  237. package/src/internals/AutocompleteInteraction.ts +0 -107
  238. package/src/internals/ButtonInteraction.ts +0 -26
  239. package/src/internals/ChannelSelectMenuInteraction.ts +0 -15
  240. package/src/internals/CommandHandler.ts +0 -127
  241. package/src/internals/CommandInteraction.ts +0 -49
  242. package/src/internals/ComponentHandler.ts +0 -92
  243. package/src/internals/MentionableSelectMenuInteraction.ts +0 -21
  244. package/src/internals/ModalHandler.ts +0 -27
  245. package/src/internals/ModalInteraction.ts +0 -25
  246. package/src/internals/OptionsHandler.ts +0 -148
  247. package/src/internals/RoleSelectMenuInteraction.ts +0 -20
  248. package/src/internals/StringSelectMenuInteraction.ts +0 -20
  249. package/src/internals/UserSelectMenuInteraction.ts +0 -20
  250. package/src/structures/DmChannel.ts +0 -31
  251. package/src/structures/GroupDmChannel.ts +0 -132
  252. package/src/structures/Guild.ts +0 -154
  253. package/src/structures/GuildAnnouncementChannel.ts +0 -20
  254. package/src/structures/GuildCategoryChannel.ts +0 -16
  255. package/src/structures/GuildForumChannel.ts +0 -20
  256. package/src/structures/GuildMediaChannel.ts +0 -13
  257. package/src/structures/GuildMember.ts +0 -231
  258. package/src/structures/GuildStageOrVoiceChannel.ts +0 -46
  259. package/src/structures/GuildTextChannel.ts +0 -21
  260. package/src/structures/GuildThreadChannel.ts +0 -150
  261. package/src/structures/Message.ts +0 -124
  262. package/src/structures/Role.ts +0 -201
  263. package/src/structures/User.ts +0 -153
  264. package/src/utils.ts +0 -13
  265. package/tests/index.test.ts +0 -4
  266. package/tsconfig.json +0 -12
  267. package/typedoc.json +0 -9
@@ -1,157 +0,0 @@
1
- ---
2
- title: Guild
3
- ---
4
-
5
- ## Extends
6
-
7
- - `Base`
8
-
9
- ## Constructors
10
-
11
- ### new Guild()
12
-
13
- > **new Guild**(`client`, `rawDataOrId`): [`Guild`](/carbon/api/classes/Guild)
14
-
15
- #### Parameters
16
-
17
- | Parameter | Type |
18
- | ------ | ------ |
19
- | `client` | [`Client`](/carbon/api/classes/Client) |
20
- | `rawDataOrId` | `string` \| `APIGuild` |
21
-
22
- #### Returns
23
-
24
- [`Guild`](/carbon/api/classes/Guild)
25
-
26
- #### Overrides
27
-
28
- `Base.constructor`
29
-
30
- ## Properties
31
-
32
- | Property | Type | Description | Inherited from |
33
- | ------ | ------ | ------ | ------ |
34
- | `client` | [`Client`](/carbon/api/classes/Client) | - | `Base.client` |
35
- | `description?` | `null` \| `string` | The description of the guild. | - |
36
- | `icon?` | `null` \| `string` | The icon hash of the guild. You can use [Guild.iconUrl](/carbon/api/classes/Guild#iconurl) to get the URL of the icon. | - |
37
- | `id` | `string` | The ID of the guild | - |
38
- | `name?` | `string` | The name of the guild. | - |
39
- | `ownerId?` | `string` | The ID of the owner of the guild. | - |
40
- | `partial` | `boolean` | Whether the guild is a partial guild (meaning it does not have all the data). If this is true, you should use [Guild.fetch](/carbon/api/classes/Guild#fetch) to get the full data of the guild. | - |
41
- | `splash?` | `null` \| `string` | The splash hash of the guild. You can use [Guild.splashUrl](/carbon/api/classes/Guild#splashurl) to get the URL of the splash. | - |
42
-
43
- ## Accessors
44
-
45
- ### iconUrl
46
-
47
- > `get` **iconUrl**(): `null` \| `string`
48
-
49
- Get the URL of the guild's icon
50
-
51
- #### Returns
52
-
53
- `null` \| `string`
54
-
55
- ***
56
-
57
- ### roles
58
-
59
- > `get` **roles**(): [`Role`](/carbon/api/classes/Role)[]
60
-
61
- Get all roles in the guild
62
-
63
- #### Returns
64
-
65
- [`Role`](/carbon/api/classes/Role)[]
66
-
67
- ***
68
-
69
- ### splashUrl
70
-
71
- > `get` **splashUrl**(): `null` \| `string`
72
-
73
- Get the URL of the guild's splash
74
-
75
- #### Returns
76
-
77
- `null` \| `string`
78
-
79
- ## Methods
80
-
81
- ### createRole()
82
-
83
- > **createRole**(`data`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`Role`](/carbon/api/classes/Role)\>
84
-
85
- Create a role in the guild
86
-
87
- #### Parameters
88
-
89
- | Parameter | Type |
90
- | ------ | ------ |
91
- | `data` | `RESTPostAPIGuildRoleJSONBody` |
92
-
93
- #### Returns
94
-
95
- [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`Role`](/carbon/api/classes/Role)\>
96
-
97
- ***
98
-
99
- ### fetch()
100
-
101
- > **fetch**(): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
102
-
103
- Fetch updated data for this guild.
104
- If the guild is partial, this will fetch all the data for the guild and populate the fields.
105
- If the guild is not partial, all fields will be updated with new values from Discord.
106
-
107
- #### Returns
108
-
109
- [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
110
-
111
- ***
112
-
113
- ### fetchChannel()
114
-
115
- > **fetchChannel**(`channelId`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`null` \| [`DmChannel`](/carbon/api/classes/DmChannel) \| [`GroupDmChannel`](/carbon/api/classes/GroupDmChannel) \| [`GuildTextChannel`](/carbon/api/classes/GuildTextChannel) \| [`GuildVoiceChannel`](/carbon/api/classes/GuildVoiceChannel) \| [`GuildCategoryChannel`](/carbon/api/classes/GuildCategoryChannel) \| [`GuildAnnouncementChannel`](/carbon/api/classes/GuildAnnouncementChannel) \| [`GuildThreadChannel`](/carbon/api/classes/GuildThreadChannel)\<`ThreadChannelType`\> \| [`GuildStageChannel`](/carbon/api/classes/GuildStageChannel) \| [`GuildForumChannel`](/carbon/api/classes/GuildForumChannel) \| [`GuildMediaChannel`](/carbon/api/classes/GuildMediaChannel)\>
116
-
117
- Fetch a channel from the guild by ID
118
-
119
- #### Parameters
120
-
121
- | Parameter | Type |
122
- | ------ | ------ |
123
- | `channelId` | `string` |
124
-
125
- #### Returns
126
-
127
- [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`null` \| [`DmChannel`](/carbon/api/classes/DmChannel) \| [`GroupDmChannel`](/carbon/api/classes/GroupDmChannel) \| [`GuildTextChannel`](/carbon/api/classes/GuildTextChannel) \| [`GuildVoiceChannel`](/carbon/api/classes/GuildVoiceChannel) \| [`GuildCategoryChannel`](/carbon/api/classes/GuildCategoryChannel) \| [`GuildAnnouncementChannel`](/carbon/api/classes/GuildAnnouncementChannel) \| [`GuildThreadChannel`](/carbon/api/classes/GuildThreadChannel)\<`ThreadChannelType`\> \| [`GuildStageChannel`](/carbon/api/classes/GuildStageChannel) \| [`GuildForumChannel`](/carbon/api/classes/GuildForumChannel) \| [`GuildMediaChannel`](/carbon/api/classes/GuildMediaChannel)\>
128
-
129
- ***
130
-
131
- ### fetchMember()
132
-
133
- > **fetchMember**(`memberId`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`GuildMember`\>
134
-
135
- Get a member in the guild by ID
136
-
137
- #### Parameters
138
-
139
- | Parameter | Type |
140
- | ------ | ------ |
141
- | `memberId` | `string` |
142
-
143
- #### Returns
144
-
145
- [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`GuildMember`\>
146
-
147
- ***
148
-
149
- ### leave()
150
-
151
- > **leave**(): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`unknown`\>
152
-
153
- Leave the guild
154
-
155
- #### Returns
156
-
157
- [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`unknown`\>
@@ -1,377 +0,0 @@
1
- ---
2
- title: GuildAnnouncementChannel
3
- ---
4
-
5
- Represents a guild announcement channel.
6
-
7
- ## Extends
8
-
9
- - [`BaseGuildTextChannel`](/carbon/api/classes/BaseGuildTextChannel)\<`ChannelType.GuildAnnouncement`\>
10
-
11
- ## Constructors
12
-
13
- ### new GuildAnnouncementChannel()
14
-
15
- > **new GuildAnnouncementChannel**(`client`, `rawDataOrId`): [`GuildAnnouncementChannel`](/carbon/api/classes/GuildAnnouncementChannel)
16
-
17
- #### Parameters
18
-
19
- | Parameter | Type |
20
- | ------ | ------ |
21
- | `client` | [`Client`](/carbon/api/classes/Client) |
22
- | `rawDataOrId` | `string` \| `APINewsChannel` |
23
-
24
- #### Returns
25
-
26
- [`GuildAnnouncementChannel`](/carbon/api/classes/GuildAnnouncementChannel)
27
-
28
- #### Inherited from
29
-
30
- [`BaseGuildTextChannel`](/carbon/api/classes/BaseGuildTextChannel).[`constructor`](/carbon/api/classes/BaseGuildTextChannel#constructors)
31
-
32
- ## Properties
33
-
34
- | Property | Modifier | Type | Default value | Description | Overrides | Inherited from |
35
- | ------ | ------ | ------ | ------ | ------ | ------ | ------ |
36
- | `client` | `public` | [`Client`](/carbon/api/classes/Client) | `undefined` | - | - | [`BaseGuildTextChannel`](/carbon/api/classes/BaseGuildTextChannel).`client` |
37
- | `flags?` | `public` | `null` \| `number` | `undefined` | The flags of the channel in a bitfield. **See** https://discord.com/developers/docs/resources/channel#channel-object-channel-flags | - | [`BaseGuildTextChannel`](/carbon/api/classes/BaseGuildTextChannel).`flags` |
38
- | `guildId?` | `public` | `string` | `undefined` | The ID of the guild this channel is in | - | [`BaseGuildTextChannel`](/carbon/api/classes/BaseGuildTextChannel).`guildId` |
39
- | `id` | `public` | `string` | `undefined` | The id of the channel. | - | [`BaseGuildTextChannel`](/carbon/api/classes/BaseGuildTextChannel).`id` |
40
- | `lastMessageId?` | `public` | `null` \| `string` | `undefined` | The ID of the last message sent in the channel. **Remarks** This might not always resolve to a message. The ID still stays a part of the channel's data, even if the message is deleted. | - | [`BaseGuildTextChannel`](/carbon/api/classes/BaseGuildTextChannel).`lastMessageId` |
41
- | `lastPinTimestamp?` | `public` | `null` \| `string` | `undefined` | The timestamp of the last pin in the channel. | - | [`BaseGuildTextChannel`](/carbon/api/classes/BaseGuildTextChannel).`lastPinTimestamp` |
42
- | `name?` | `public` | `string` | `undefined` | The name of the channel. | - | [`BaseGuildTextChannel`](/carbon/api/classes/BaseGuildTextChannel).`name` |
43
- | `nsfw?` | `public` | `boolean` | `undefined` | Whether the channel is marked as nsfw. | - | [`BaseGuildTextChannel`](/carbon/api/classes/BaseGuildTextChannel).`nsfw` |
44
- | `parentId?` | `public` | `null` \| `string` | `undefined` | The ID of the parent category for the channel. | - | [`BaseGuildTextChannel`](/carbon/api/classes/BaseGuildTextChannel).`parentId` |
45
- | `partial` | `public` | `boolean` | `undefined` | Whether the channel is a partial channel (meaning it does not have all the data). If this is true, you should use [BaseChannel.fetch](/carbon/api/classes/BaseChannel#fetch) to get the full data of the channel. | - | [`BaseGuildTextChannel`](/carbon/api/classes/BaseGuildTextChannel).`partial` |
46
- | `position?` | `public` | `number` | `undefined` | The position of the channel in the channel list. | - | [`BaseGuildTextChannel`](/carbon/api/classes/BaseGuildTextChannel).`position` |
47
- | `rateLimitPerUser?` | `public` | `null` \| `number` | `undefined` | The rate limit per user for the channel, in seconds. | - | [`BaseGuildTextChannel`](/carbon/api/classes/BaseGuildTextChannel).`rateLimitPerUser` |
48
- | `rawData` | `protected` | `null` \| `APINewsChannel` | `null` | The raw data of the channel. | - | [`BaseGuildTextChannel`](/carbon/api/classes/BaseGuildTextChannel).`rawData` |
49
- | `type` | `public` | `GuildAnnouncement` | `ChannelType.GuildAnnouncement` | The type of the channel. | [`BaseGuildTextChannel`](/carbon/api/classes/BaseGuildTextChannel).`type` | - |
50
-
51
- ## Accessors
52
-
53
- ### guild
54
-
55
- > `get` **guild**(): [`Guild`](/carbon/api/classes/Guild)
56
-
57
- The guild this channel is in
58
-
59
- #### Returns
60
-
61
- [`Guild`](/carbon/api/classes/Guild)
62
-
63
- #### Inherited from
64
-
65
- [`BaseGuildTextChannel`](/carbon/api/classes/BaseGuildTextChannel).[`guild`](/carbon/api/classes/BaseGuildTextChannel#guild)
66
-
67
- ***
68
-
69
- ### lastMessage
70
-
71
- > `get` **lastMessage**(): `null` \| [`Message`](/carbon/api/classes/Message)
72
-
73
- The last message sent in the channel.
74
-
75
- #### Remarks
76
-
77
- This might not always resolve to a message. The ID still stays a part of the channel's data, even if the message is deleted.
78
- This will always return a partial message, so you can use [Message.fetch](/carbon/api/classes/Message#fetch) to get the full message data.
79
-
80
- #### Returns
81
-
82
- `null` \| [`Message`](/carbon/api/classes/Message)
83
-
84
- #### Inherited from
85
-
86
- [`BaseGuildTextChannel`](/carbon/api/classes/BaseGuildTextChannel).[`lastMessage`](/carbon/api/classes/BaseGuildTextChannel#lastmessage)
87
-
88
- ## Methods
89
-
90
- ### createInvite()
91
-
92
- > **createInvite**(`options`?): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`APIExtendedInvite`\>
93
-
94
- Create an invite for the channel
95
-
96
- #### Parameters
97
-
98
- | Parameter | Type |
99
- | ------ | ------ |
100
- | `options`? | `RESTPostAPIChannelInviteJSONBody` |
101
-
102
- #### Returns
103
-
104
- [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`APIExtendedInvite`\>
105
-
106
- #### Inherited from
107
-
108
- [`BaseGuildTextChannel`](/carbon/api/classes/BaseGuildTextChannel).[`createInvite`](/carbon/api/classes/BaseGuildTextChannel#createinvite)
109
-
110
- ***
111
-
112
- ### fetch()
113
-
114
- > **fetch**(): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
115
-
116
- Fetches the channel from the API.
117
-
118
- #### Returns
119
-
120
- [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
121
-
122
- The channel data.
123
-
124
- #### Inherited from
125
-
126
- [`BaseGuildTextChannel`](/carbon/api/classes/BaseGuildTextChannel).[`fetch`](/carbon/api/classes/BaseGuildTextChannel#fetch)
127
-
128
- ***
129
-
130
- ### follow()
131
-
132
- > **follow**(`targetChannel`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
133
-
134
- #### Parameters
135
-
136
- | Parameter | Type |
137
- | ------ | ------ |
138
- | `targetChannel` | `string` \| [`GuildTextChannel`](/carbon/api/classes/GuildTextChannel) |
139
-
140
- #### Returns
141
-
142
- [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
143
-
144
- ***
145
-
146
- ### getInvites()
147
-
148
- > **getInvites**(): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`RESTGetAPIGuildInvitesResult`\>
149
-
150
- Get the invites for the channel
151
-
152
- #### Returns
153
-
154
- [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`RESTGetAPIGuildInvitesResult`\>
155
-
156
- #### Inherited from
157
-
158
- [`BaseGuildTextChannel`](/carbon/api/classes/BaseGuildTextChannel).[`getInvites`](/carbon/api/classes/BaseGuildTextChannel#getinvites)
159
-
160
- ***
161
-
162
- ### getPinnedMessages()
163
-
164
- > **getPinnedMessages**(): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`Message`](/carbon/api/classes/Message)[]\>
165
-
166
- Get the pinned messages in the channel
167
-
168
- #### Returns
169
-
170
- [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`Message`](/carbon/api/classes/Message)[]\>
171
-
172
- #### Inherited from
173
-
174
- [`BaseGuildTextChannel`](/carbon/api/classes/BaseGuildTextChannel).[`getPinnedMessages`](/carbon/api/classes/BaseGuildTextChannel#getpinnedmessages)
175
-
176
- ***
177
-
178
- ### send()
179
-
180
- > **send**(`message`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
181
-
182
- Send a message to the channel
183
-
184
- #### Parameters
185
-
186
- | Parameter | Type |
187
- | ------ | ------ |
188
- | `message` | `APIMessage` |
189
-
190
- #### Returns
191
-
192
- [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
193
-
194
- #### Inherited from
195
-
196
- [`BaseGuildTextChannel`](/carbon/api/classes/BaseGuildTextChannel).[`send`](/carbon/api/classes/BaseGuildTextChannel#send)
197
-
198
- ***
199
-
200
- ### setData()
201
-
202
- > `protected` **setData**(`data`): `void`
203
-
204
- #### Parameters
205
-
206
- | Parameter | Type |
207
- | ------ | ------ |
208
- | `data` | `APIGuildChannel`\<`GuildAnnouncement`\> |
209
-
210
- #### Returns
211
-
212
- `void`
213
-
214
- #### Inherited from
215
-
216
- [`BaseGuildTextChannel`](/carbon/api/classes/BaseGuildTextChannel).[`setData`](/carbon/api/classes/BaseGuildTextChannel#setdata)
217
-
218
- ***
219
-
220
- ### setMoreSpecificData()
221
-
222
- > `protected` **setMoreSpecificData**(): `void`
223
-
224
- #### Returns
225
-
226
- `void`
227
-
228
- #### Overrides
229
-
230
- [`BaseGuildTextChannel`](/carbon/api/classes/BaseGuildTextChannel).[`setMoreSpecificData`](/carbon/api/classes/BaseGuildTextChannel#setmorespecificdata)
231
-
232
- ***
233
-
234
- ### setName()
235
-
236
- > **setName**(`name`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
237
-
238
- Set the name of the channel
239
-
240
- #### Parameters
241
-
242
- | Parameter | Type | Description |
243
- | ------ | ------ | ------ |
244
- | `name` | `string` | The new name of the channel |
245
-
246
- #### Returns
247
-
248
- [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
249
-
250
- #### Inherited from
251
-
252
- [`BaseGuildTextChannel`](/carbon/api/classes/BaseGuildTextChannel).[`setName`](/carbon/api/classes/BaseGuildTextChannel#setname)
253
-
254
- ***
255
-
256
- ### setNsfw()
257
-
258
- > **setNsfw**(`nsfw`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
259
-
260
- Set whether the channel is nsfw
261
-
262
- #### Parameters
263
-
264
- | Parameter | Type | Description |
265
- | ------ | ------ | ------ |
266
- | `nsfw` | `boolean` | The new nsfw status of the channel |
267
-
268
- #### Returns
269
-
270
- [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
271
-
272
- #### Inherited from
273
-
274
- [`BaseGuildTextChannel`](/carbon/api/classes/BaseGuildTextChannel).[`setNsfw`](/carbon/api/classes/BaseGuildTextChannel#setnsfw)
275
-
276
- ***
277
-
278
- ### setParent()
279
-
280
- > **setParent**(`parent`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
281
-
282
- Set the parent ID of the channel
283
-
284
- #### Parameters
285
-
286
- | Parameter | Type | Description |
287
- | ------ | ------ | ------ |
288
- | `parent` | `string` \| [`GuildCategoryChannel`](/carbon/api/classes/GuildCategoryChannel) | The new category channel or ID to set |
289
-
290
- #### Returns
291
-
292
- [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
293
-
294
- #### Inherited from
295
-
296
- [`BaseGuildTextChannel`](/carbon/api/classes/BaseGuildTextChannel).[`setParent`](/carbon/api/classes/BaseGuildTextChannel#setparent)
297
-
298
- ***
299
-
300
- ### setPosition()
301
-
302
- > **setPosition**(`position`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
303
-
304
- Set the position of the channel
305
-
306
- #### Parameters
307
-
308
- | Parameter | Type | Description |
309
- | ------ | ------ | ------ |
310
- | `position` | `number` | The new position of the channel |
311
-
312
- #### Returns
313
-
314
- [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
315
-
316
- #### Inherited from
317
-
318
- [`BaseGuildTextChannel`](/carbon/api/classes/BaseGuildTextChannel).[`setPosition`](/carbon/api/classes/BaseGuildTextChannel#setposition)
319
-
320
- ***
321
-
322
- ### setSpecificData()
323
-
324
- > `protected` **setSpecificData**(`data`): `void`
325
-
326
- #### Parameters
327
-
328
- | Parameter | Type |
329
- | ------ | ------ |
330
- | `data` | `APIGuildTextChannel`\<`GuildAnnouncement`\> |
331
-
332
- #### Returns
333
-
334
- `void`
335
-
336
- #### Inherited from
337
-
338
- [`BaseGuildTextChannel`](/carbon/api/classes/BaseGuildTextChannel).[`setSpecificData`](/carbon/api/classes/BaseGuildTextChannel#setspecificdata)
339
-
340
- ***
341
-
342
- ### startThread()
343
-
344
- > **startThread**(`data`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`GuildThreadChannel`](/carbon/api/classes/GuildThreadChannel)\<`ThreadChannelType`\>\>
345
-
346
- Start a thread without an associated start message.
347
- If you want to start a thread with a start message, use [Message.startThread](/carbon/api/classes/Message#startthread)
348
-
349
- #### Parameters
350
-
351
- | Parameter | Type |
352
- | ------ | ------ |
353
- | `data` | `RESTPostAPIChannelThreadsJSONBody` |
354
-
355
- #### Returns
356
-
357
- [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`GuildThreadChannel`](/carbon/api/classes/GuildThreadChannel)\<`ThreadChannelType`\>\>
358
-
359
- #### Inherited from
360
-
361
- [`BaseGuildTextChannel`](/carbon/api/classes/BaseGuildTextChannel).[`startThread`](/carbon/api/classes/BaseGuildTextChannel#startthread)
362
-
363
- ***
364
-
365
- ### triggerTyping()
366
-
367
- > **triggerTyping**(): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
368
-
369
- Trigger a typing indicator in the channel (this will expire after 10 seconds)
370
-
371
- #### Returns
372
-
373
- [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
374
-
375
- #### Inherited from
376
-
377
- [`BaseGuildTextChannel`](/carbon/api/classes/BaseGuildTextChannel).[`triggerTyping`](/carbon/api/classes/BaseGuildTextChannel#triggertyping)