@vencord/types 1.8.4 → 1.13.1

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 (420) hide show
  1. package/Vencord.d.ts +2 -0
  2. package/api/Badges.d.ts +10 -5
  3. package/api/ChatButtons.d.ts +6 -5
  4. package/api/Commands/commandHelpers.d.ts +3 -4
  5. package/api/Commands/index.d.ts +8 -7
  6. package/api/Commands/types.d.ts +3 -72
  7. package/api/ContextMenu.d.ts +6 -5
  8. package/api/MemberListDecorators.d.ts +14 -26
  9. package/api/MessageAccessories.d.ts +7 -7
  10. package/api/MessageDecorations.d.ts +8 -9
  11. package/api/MessageEvents.d.ts +13 -38
  12. package/api/MessagePopover.d.ts +9 -9
  13. package/api/MessageUpdater.d.ts +8 -0
  14. package/api/Notices.d.ts +2 -1
  15. package/api/Notifications/NotificationComponent.d.ts +1 -2
  16. package/api/Notifications/notificationLog.d.ts +1 -2
  17. package/api/ServerList.d.ts +4 -4
  18. package/api/Settings.d.ts +3 -1
  19. package/api/Styles.d.ts +0 -1
  20. package/api/UserSettings.d.ts +40 -0
  21. package/api/index.d.ts +10 -0
  22. package/components/CheckedTextInput.d.ts +1 -2
  23. package/components/CodeBlock.d.ts +1 -2
  24. package/components/ErrorBoundary.d.ts +4 -3
  25. package/components/ErrorCard.d.ts +1 -1
  26. package/components/Flex.d.ts +1 -2
  27. package/components/FormDivider.d.ts +4 -0
  28. package/components/FormSwitch.d.ts +14 -0
  29. package/components/Grid.d.ts +8 -0
  30. package/components/Heart.d.ts +2 -2
  31. package/components/Icons.d.ts +12 -8
  32. package/components/Link.d.ts +1 -2
  33. package/components/Switch.d.ts +1 -2
  34. package/components/index.d.ts +4 -3
  35. package/components/{VencordSettings → settings}/AddonCard.d.ts +2 -2
  36. package/components/settings/DonateButton.d.ts +2 -0
  37. package/components/settings/PluginBadge.d.ts +4 -0
  38. package/components/settings/QuickAction.d.ts +12 -0
  39. package/components/settings/SpecialCard.d.ts +14 -0
  40. package/components/settings/index.d.ts +7 -0
  41. package/components/{VencordSettings/shared.d.ts → settings/tabs/BaseTab.d.ts} +2 -4
  42. package/components/settings/tabs/index.d.ts +11 -0
  43. package/components/settings/tabs/patchHelper/FullPatchInput.d.ts +8 -0
  44. package/components/settings/tabs/patchHelper/PatchPreview.d.ts +9 -0
  45. package/components/settings/tabs/patchHelper/ReplacementInput.d.ts +5 -0
  46. package/components/{VencordSettings/PatchHelperTab.d.ts → settings/tabs/patchHelper/index.d.ts} +0 -1
  47. package/components/settings/tabs/plugins/ContributorModal.d.ts +3 -0
  48. package/components/settings/tabs/plugins/LinkIconButton.d.ts +10 -0
  49. package/components/settings/tabs/plugins/PluginCard.d.ts +10 -0
  50. package/components/settings/tabs/plugins/PluginModal.d.ts +10 -0
  51. package/components/settings/tabs/plugins/components/BooleanSetting.d.ts +3 -0
  52. package/components/settings/tabs/plugins/components/Common.d.ts +24 -0
  53. package/components/settings/tabs/plugins/components/ComponentSetting.d.ts +3 -0
  54. package/components/settings/tabs/plugins/components/NumberSetting.d.ts +3 -0
  55. package/components/settings/tabs/plugins/components/SelectSetting.d.ts +3 -0
  56. package/components/settings/tabs/plugins/components/SliderSetting.d.ts +3 -0
  57. package/components/settings/tabs/plugins/components/TextSetting.d.ts +3 -0
  58. package/components/settings/tabs/plugins/components/index.d.ts +5 -0
  59. package/components/settings/tabs/plugins/index.d.ts +6 -0
  60. package/components/{VencordSettings → settings/tabs/sync}/BackupAndRestoreTab.d.ts +0 -1
  61. package/components/{VencordSettings → settings/tabs/sync}/CloudTab.d.ts +0 -1
  62. package/components/settings/tabs/themes/CspErrorCard.d.ts +1 -0
  63. package/components/settings/tabs/themes/LocalThemesTab.d.ts +1 -0
  64. package/components/settings/tabs/themes/OnlineThemesTab.d.ts +1 -0
  65. package/components/settings/tabs/themes/ThemeCard.d.ts +9 -0
  66. package/components/{VencordSettings/ThemesTab.d.ts → settings/tabs/themes/index.d.ts} +1 -1
  67. package/components/settings/tabs/updater/Components.d.ts +15 -0
  68. package/components/{VencordSettings/UpdaterTab.d.ts → settings/tabs/updater/index.d.ts} +0 -1
  69. package/components/settings/tabs/updater/runWithDispatch.d.ts +1 -0
  70. package/components/settings/tabs/vencord/DonateButton.d.ts +2 -0
  71. package/components/settings/tabs/vencord/MacVibrancySettings.d.ts +1 -0
  72. package/components/settings/tabs/vencord/NotificationSettings.d.ts +2 -0
  73. package/components/{VencordSettings/PluginsTab.d.ts → settings/tabs/vencord/index.d.ts} +0 -1
  74. package/modules.d.ts +6 -9
  75. package/package.json +10 -10
  76. package/plugins/_api/badges/index.d.ts +27 -8
  77. package/plugins/_api/chatButtons.d.ts +1 -1
  78. package/plugins/_api/commands.d.ts +2 -1
  79. package/plugins/_api/contextMenu.d.ts +5 -3
  80. package/plugins/{noScreensharePreview/index.d.ts → _api/dynamicImageModalApi.d.ts} +2 -2
  81. package/plugins/_api/{memberListDecorators.d.ts → memberListDecorators/index.d.ts} +2 -1
  82. package/plugins/_api/menuItemDemangler.d.ts +17 -0
  83. package/plugins/_api/messageAccessories.d.ts +1 -1
  84. package/plugins/_api/messageDecorations/index.d.ts +17 -0
  85. package/plugins/_api/messageEvents.d.ts +2 -2
  86. package/plugins/_api/messagePopover.d.ts +2 -2
  87. package/plugins/_api/{messageDecorations.d.ts → messageUpdater.d.ts} +1 -1
  88. package/plugins/_api/notices.d.ts +12 -3
  89. package/plugins/_api/serverList.d.ts +1 -1
  90. package/plugins/_api/userSettings.d.ts +16 -0
  91. package/plugins/_core/noTrack.d.ts +8 -10
  92. package/plugins/_core/settings.d.ts +4 -5
  93. package/plugins/_core/supportHelper.d.ts +18 -7
  94. package/plugins/accountPanelServerProfile/index.d.ts +45 -0
  95. package/plugins/alwaysAnimate/index.d.ts +1 -1
  96. package/plugins/alwaysExpandRoles/index.d.ts +16 -0
  97. package/plugins/alwaysTrust/index.d.ts +1 -1
  98. package/plugins/anonymiseFileNames/index.d.ts +18 -18
  99. package/plugins/appleMusic.desktop/index.d.ts +226 -0
  100. package/plugins/appleMusic.desktop/native.d.ts +2 -0
  101. package/plugins/arRPC.web/index.d.ts +5 -3
  102. package/plugins/{partyMode → autoDndWhilePlaying.discordDesktop}/index.d.ts +16 -25
  103. package/plugins/betterFolders/FolderSideBar.d.ts +0 -1
  104. package/plugins/betterFolders/index.d.ts +34 -10
  105. package/plugins/betterGifAltText/index.d.ts +1 -1
  106. package/plugins/betterGifPicker/index.d.ts +1 -1
  107. package/plugins/betterNotes/index.d.ts +30 -18
  108. package/plugins/betterRoleContext/index.d.ts +32 -2
  109. package/plugins/betterRoleDot/index.d.ts +1 -10
  110. package/plugins/betterSessions/components/RenameButton.d.ts +1 -2
  111. package/plugins/betterSessions/components/RenameModal.d.ts +1 -2
  112. package/plugins/betterSessions/components/icons.d.ts +9 -9
  113. package/plugins/betterSessions/index.d.ts +3 -10
  114. package/plugins/betterSessions/utils.d.ts +1 -2
  115. package/plugins/betterSettings/PluginsSubmenu.d.ts +1 -0
  116. package/plugins/betterSettings/index.d.ts +7 -5
  117. package/plugins/betterUploadButton/index.d.ts +9 -2
  118. package/plugins/biggerStreamPreview/index.d.ts +2 -2
  119. package/plugins/biggerStreamPreview/webpack/types/stores.d.ts +1 -1
  120. package/plugins/blurNsfw/index.d.ts +1 -1
  121. package/plugins/callTimer/index.d.ts +4 -5
  122. package/plugins/clearURLs/index.d.ts +15 -8
  123. package/plugins/clientTheme/components/Settings.d.ts +2 -0
  124. package/plugins/clientTheme/index.d.ts +30 -14
  125. package/plugins/clientTheme/utils/colorUtils.d.ts +6 -0
  126. package/plugins/clientTheme/utils/styleUtils.d.ts +3 -0
  127. package/plugins/colorSighted/index.d.ts +1 -1
  128. package/plugins/consoleJanitor/index.d.ts +98 -0
  129. package/plugins/consoleShortcuts/index.d.ts +10 -180
  130. package/plugins/consoleShortcuts/native.d.ts +2 -0
  131. package/plugins/copyEmojiMarkdown/index.d.ts +37 -0
  132. package/plugins/copyFileContents/index.d.ts +21 -0
  133. package/plugins/{searchReply → copyStickerLinks}/index.d.ts +2 -1
  134. package/plugins/copyUserURLs/index.d.ts +1 -1
  135. package/plugins/crashHandler/index.d.ts +1 -1
  136. package/plugins/ctrlEnterSend/index.d.ts +1 -1
  137. package/plugins/customIdle/index.d.ts +48 -0
  138. package/plugins/customRPC/index.d.ts +15 -13
  139. package/plugins/dearrow/index.d.ts +14 -2
  140. package/plugins/decor/index.d.ts +3 -6
  141. package/plugins/decor/lib/stores/UsersDecorationsStore.d.ts +1 -1
  142. package/plugins/decor/settings.d.ts +2 -5
  143. package/plugins/decor/ui/components/DecorDecorationGridDecoration.d.ts +1 -1
  144. package/plugins/decor/ui/components/DecorSection.d.ts +1 -2
  145. package/plugins/decor/ui/components/DecorationContextMenu.d.ts +1 -2
  146. package/plugins/decor/ui/components/DecorationGridCreate.d.ts +1 -1
  147. package/plugins/decor/ui/components/DecorationGridNone.d.ts +1 -1
  148. package/plugins/decor/ui/components/Grid.d.ts +1 -1
  149. package/plugins/decor/ui/components/SectionedGridList.d.ts +1 -1
  150. package/plugins/decor/ui/components/index.d.ts +1 -1
  151. package/plugins/decor/ui/index.d.ts +2 -2
  152. package/plugins/devCompanion.dev/index.d.ts +3 -2
  153. package/plugins/disableCallIdle/index.d.ts +1 -1
  154. package/plugins/dontRoundMyTimestamps/index.d.ts +11 -0
  155. package/plugins/experiments/index.d.ts +20 -17
  156. package/plugins/{emoteCloner → expressionCloner}/index.d.ts +1 -1
  157. package/plugins/f8break/index.d.ts +1 -1
  158. package/plugins/fakeNitro/index.d.ts +6 -83
  159. package/plugins/fakeProfileThemes/index.d.ts +5 -7
  160. package/plugins/favEmojiFirst/index.d.ts +2 -2
  161. package/plugins/favGifSearch/index.d.ts +5 -8
  162. package/plugins/fixCodeblockGap/index.d.ts +1 -1
  163. package/plugins/{nsfwGateBypass → fixImagesQuality}/index.d.ts +1 -1
  164. package/plugins/fixSpotifyEmbeds.desktop/index.d.ts +1 -1
  165. package/plugins/fixYoutubeEmbeds.desktop/index.d.ts +1 -1
  166. package/plugins/forceOwnerCrown/index.d.ts +2 -2
  167. package/plugins/friendInvites/index.d.ts +6 -24
  168. package/plugins/friendsSince/index.d.ts +3 -3
  169. package/plugins/fullSearchContext/index.d.ts +22 -0
  170. package/plugins/fullUserInChatbox/index.d.ts +24 -0
  171. package/plugins/gameActivityToggle/index.d.ts +6 -5
  172. package/plugins/gifPaste/index.d.ts +1 -1
  173. package/plugins/greetStickerPicker/index.d.ts +4 -4
  174. package/plugins/hideAttachments/index.d.ts +21 -3
  175. package/plugins/iLoveSpam/index.d.ts +1 -1
  176. package/plugins/ignoreActivities/index.d.ts +73 -17
  177. package/plugins/imageFilename/index.d.ts +31 -0
  178. package/plugins/imageLink/index.d.ts +1 -1
  179. package/plugins/imageZoom/components/Magnifier.d.ts +0 -1
  180. package/plugins/imageZoom/index.d.ts +7 -5
  181. package/plugins/implicitRelationships/index.d.ts +8 -1
  182. package/plugins/index.d.ts +3 -1
  183. package/plugins/invisibleChat.desktop/components/DecryptionModal.d.ts +1 -2
  184. package/plugins/invisibleChat.desktop/index.d.ts +25 -17
  185. package/plugins/ircColors/index.d.ts +90 -0
  186. package/plugins/keepCurrentChannel/index.d.ts +8 -1
  187. package/plugins/{lastfm → lastfmRichPresence}/index.d.ts +39 -25
  188. package/plugins/loadingQuotes/index.d.ts +42 -3
  189. package/plugins/memberCount/CircleIcon.d.ts +3 -0
  190. package/plugins/memberCount/MemberCount.d.ts +1 -2
  191. package/plugins/memberCount/OnlineMemberCountStore.d.ts +13 -11
  192. package/plugins/memberCount/VoiceIcon.d.ts +3 -0
  193. package/plugins/memberCount/index.d.ts +69 -11
  194. package/plugins/mentionAvatars/index.d.ts +40 -0
  195. package/plugins/messageClickActions/index.d.ts +2 -2
  196. package/plugins/messageLatency/index.d.ts +8 -4
  197. package/plugins/messageLinkEmbeds/index.d.ts +2 -4
  198. package/plugins/messageLogger/HistoryModal.d.ts +6 -0
  199. package/plugins/messageLogger/index.d.ts +46 -8
  200. package/plugins/messageTags/index.d.ts +23 -5
  201. package/plugins/mutualGroupDMs/index.d.ts +17 -5
  202. package/plugins/newGuildSettings/index.d.ts +8 -2
  203. package/plugins/noBlockedMessages/index.d.ts +35 -11
  204. package/plugins/noDeepLinks.web/index.d.ts +18 -0
  205. package/plugins/noDevtoolsWarning/index.d.ts +1 -1
  206. package/plugins/noF1/index.d.ts +1 -1
  207. package/plugins/{noRPC.discordDesktop → noMaskedUrlPaste}/index.d.ts +2 -2
  208. package/plugins/noMosaic/index.d.ts +2 -2
  209. package/plugins/noOnboardingDelay/index.d.ts +16 -0
  210. package/plugins/noPendingCount/index.d.ts +10 -3
  211. package/plugins/noProfileThemes/index.d.ts +2 -1
  212. package/plugins/noReplyMention/index.d.ts +12 -2
  213. package/plugins/noServerEmojis/index.d.ts +1 -1
  214. package/plugins/noSystemBadge.discordDesktop/index.d.ts +1 -1
  215. package/plugins/noTypingAnimation/index.d.ts +2 -2
  216. package/plugins/noUnblockToJump/index.d.ts +1 -1
  217. package/plugins/normalizeMessageLinks/index.d.ts +1 -1
  218. package/plugins/notificationVolume/index.d.ts +1 -1
  219. package/plugins/onePingPerDM/index.d.ts +2 -2
  220. package/plugins/oneko/index.d.ts +1 -1
  221. package/plugins/openInApp/index.d.ts +6 -51
  222. package/plugins/openInApp/native.d.ts +0 -1
  223. package/plugins/overrideForumDefaults/index.d.ts +1 -1
  224. package/plugins/pauseInvitesForever/index.d.ts +1 -2
  225. package/plugins/permissionFreeWill/index.d.ts +10 -3
  226. package/plugins/permissionsViewer/components/RolesAndUsersPermissions.d.ts +2 -3
  227. package/plugins/permissionsViewer/components/UserPermissions.d.ts +2 -3
  228. package/plugins/permissionsViewer/components/icons.d.ts +3 -4
  229. package/plugins/permissionsViewer/index.d.ts +7 -25
  230. package/plugins/permissionsViewer/utils.d.ts +3 -5
  231. package/plugins/petpet/index.d.ts +4 -4
  232. package/plugins/pictureInPicture/index.d.ts +3 -4
  233. package/plugins/pinDms/components/CreateCategoryModal.d.ts +3 -4
  234. package/plugins/pinDms/data.d.ts +10 -12
  235. package/plugins/pinDms/index.d.ts +50 -20
  236. package/plugins/plainFolderIcon/index.d.ts +3 -2
  237. package/plugins/platformIndicators/index.d.ts +12 -1
  238. package/plugins/previewMessage/index.d.ts +3 -5
  239. package/plugins/quickMention/index.d.ts +9 -6
  240. package/plugins/quickReply/index.d.ts +24 -1
  241. package/plugins/reactErrorDecoder/index.d.ts +3 -3
  242. package/plugins/readAllNotificationsButton/index.d.ts +1 -2
  243. package/plugins/relationshipNotifier/index.d.ts +1 -1
  244. package/plugins/relationshipNotifier/types.d.ts +1 -4
  245. package/plugins/relationshipNotifier/utils.d.ts +7 -0
  246. package/plugins/replaceGoogleSearch/index.d.ts +1 -1
  247. package/plugins/replyTimestamp/index.d.ts +2 -3
  248. package/plugins/revealAllSpoilers/index.d.ts +1 -1
  249. package/plugins/reverseImageSearch/index.d.ts +1 -1
  250. package/plugins/reviewDB/components/MessageButton.d.ts +3 -4
  251. package/plugins/reviewDB/components/ReviewBadge.d.ts +1 -2
  252. package/plugins/reviewDB/components/ReviewComponent.d.ts +2 -3
  253. package/plugins/reviewDB/components/ReviewModal.d.ts +2 -1
  254. package/plugins/reviewDB/components/ReviewsView.d.ts +6 -4
  255. package/plugins/reviewDB/index.d.ts +12 -14
  256. package/plugins/reviewDB/settings.d.ts +6 -11
  257. package/plugins/reviewDB/utils.d.ts +1 -1
  258. package/plugins/roleColorEverywhere/index.d.ts +75 -29
  259. package/plugins/secretRingTone/index.d.ts +25 -4
  260. package/plugins/seeSummaries/index.d.ts +39 -0
  261. package/plugins/sendTimestamps/index.d.ts +5 -6
  262. package/plugins/serverInfo/GuildInfoModal.d.ts +3 -0
  263. package/plugins/{serverProfile → serverInfo}/index.d.ts +2 -1
  264. package/plugins/serverListIndicators/index.d.ts +2 -10
  265. package/plugins/shikiCodeblocks.desktop/api/languages.d.ts +3 -3
  266. package/plugins/shikiCodeblocks.desktop/api/shiki.d.ts +27 -1
  267. package/plugins/shikiCodeblocks.desktop/api/themes.d.ts +29 -3
  268. package/plugins/shikiCodeblocks.desktop/components/ButtonRow.d.ts +1 -2
  269. package/plugins/shikiCodeblocks.desktop/components/Code.d.ts +1 -1
  270. package/plugins/shikiCodeblocks.desktop/components/CopyButton.d.ts +1 -2
  271. package/plugins/shikiCodeblocks.desktop/components/Header.d.ts +1 -2
  272. package/plugins/shikiCodeblocks.desktop/components/Highlighter.d.ts +2 -4
  273. package/plugins/shikiCodeblocks.desktop/hooks/useShikiSettings.d.ts +2 -8
  274. package/plugins/shikiCodeblocks.desktop/index.d.ts +42 -17
  275. package/plugins/showAllMessageButtons/index.d.ts +1 -1
  276. package/plugins/showConnections/VerifiedIcon.d.ts +1 -2
  277. package/plugins/showConnections/index.d.ts +10 -14
  278. package/plugins/showHiddenChannels/components/HiddenChannelLockScreen.d.ts +1 -2
  279. package/plugins/showHiddenChannels/index.d.ts +7 -6
  280. package/plugins/showHiddenThings/index.d.ts +25 -37
  281. package/plugins/showMeYourName/index.d.ts +30 -3
  282. package/plugins/showTimeoutDuration/index.d.ts +2 -2
  283. package/plugins/silentMessageToggle/index.d.ts +3 -5
  284. package/plugins/silentTyping/index.d.ts +4 -6
  285. package/plugins/sortFriendRequests/index.d.ts +8 -6
  286. package/plugins/spotifyControls/PlayerComponent.d.ts +1 -2
  287. package/plugins/spotifyControls/SeekBar.d.ts +31 -0
  288. package/plugins/spotifyControls/SpotifyStore.d.ts +42 -1
  289. package/plugins/spotifyControls/index.d.ts +7 -3
  290. package/plugins/spotifyCrack/index.d.ts +1 -1
  291. package/plugins/spotifyShareCommands/index.d.ts +3 -10
  292. package/plugins/startupTimings/StartupTimingPage.d.ts +0 -1
  293. package/plugins/startupTimings/index.d.ts +2 -3
  294. package/plugins/{noDefaultHangStatus → stickerPaste}/index.d.ts +1 -1
  295. package/plugins/streamerModeOnStream/index.d.ts +1 -1
  296. package/plugins/superReactionTweaks/index.d.ts +10 -5
  297. package/plugins/textReplace/index.d.ts +21 -9
  298. package/plugins/themeAttributes/index.d.ts +3 -3
  299. package/plugins/translate/TranslateIcon.d.ts +4 -4
  300. package/plugins/translate/TranslateModal.d.ts +1 -2
  301. package/plugins/translate/TranslationAccessory.d.ts +2 -3
  302. package/plugins/translate/index.d.ts +73 -6
  303. package/plugins/translate/languages.d.ts +40 -2
  304. package/plugins/translate/native.d.ts +5 -0
  305. package/plugins/translate/settings.d.ts +61 -2
  306. package/plugins/translate/utils.d.ts +172 -1
  307. package/plugins/typingIndicator/index.d.ts +2 -3
  308. package/plugins/typingTweaks/index.d.ts +31 -29
  309. package/plugins/unindent/index.d.ts +3 -4
  310. package/plugins/unlockedAvatarZoom/index.d.ts +1 -1
  311. package/plugins/unsuppressEmbeds/index.d.ts +1 -1
  312. package/plugins/{pronoundb/components → userMessagesPronouns}/PronounsChatComponent.d.ts +1 -5
  313. package/plugins/userMessagesPronouns/index.d.ts +67 -0
  314. package/plugins/userMessagesPronouns/settings.d.ts +44 -0
  315. package/plugins/userMessagesPronouns/utils.d.ts +1 -0
  316. package/plugins/userVoiceShow/components.d.ts +7 -0
  317. package/plugins/userVoiceShow/index.d.ts +34 -12
  318. package/plugins/usrbg/index.d.ts +5 -8
  319. package/plugins/validReply/index.d.ts +2 -3
  320. package/plugins/validUser/index.d.ts +2 -3
  321. package/plugins/vcDoubleClick/index.d.ts +1 -1
  322. package/plugins/vcNarrator/VoiceSetting.d.ts +1 -0
  323. package/plugins/vcNarrator/index.d.ts +137 -10
  324. package/plugins/vcNarrator/settings.d.ts +135 -0
  325. package/plugins/vencordToolbox/index.d.ts +2 -5
  326. package/plugins/viewIcons/index.d.ts +6 -12
  327. package/plugins/viewRaw/index.d.ts +14 -4
  328. package/plugins/voiceDownload/index.d.ts +3 -4
  329. package/plugins/voiceMessages/VoicePreview.d.ts +1 -2
  330. package/plugins/voiceMessages/index.d.ts +1 -1
  331. package/plugins/voiceMessages/native.d.ts +1 -1
  332. package/plugins/voiceMessages/utils.d.ts +1 -0
  333. package/plugins/{volumeBooster.discordDesktop → volumeBooster}/index.d.ts +29 -1
  334. package/plugins/webContextMenus.web/index.d.ts +19 -3
  335. package/plugins/webKeybinds.web/index.d.ts +1 -1
  336. package/plugins/webScreenShareFixes.web/index.d.ts +6 -3
  337. package/plugins/whoReacted/index.d.ts +4 -6
  338. package/plugins/{xsOverlay.desktop → xsOverlay}/index.d.ts +32 -3
  339. package/plugins/youtubeAdblock.desktop/index.d.ts +9 -0
  340. package/plugins/youtubeAdblock.desktop/native.d.ts +1 -0
  341. package/shared/IpcEvents.d.ts +13 -10
  342. package/shared/SettingsStore.d.ts +5 -0
  343. package/shared/vencordUserAgent.d.ts +0 -1
  344. package/utils/ChangeList.d.ts +1 -1
  345. package/utils/clipboard.d.ts +1 -0
  346. package/utils/cloud.d.ts +1 -0
  347. package/utils/constants.d.ts +108 -10
  348. package/utils/cspViolations.d.ts +2 -0
  349. package/utils/dependencies.d.ts +1 -4
  350. package/utils/discord.d.ts +51 -8
  351. package/utils/index.d.ts +3 -0
  352. package/utils/intlHash.d.ts +8 -0
  353. package/utils/lazy.d.ts +2 -0
  354. package/utils/lazyReact.d.ts +5 -2
  355. package/utils/misc.d.ts +5 -2
  356. package/utils/modal.d.ts +88 -74
  357. package/utils/patches.d.ts +2 -2
  358. package/utils/quickCss.d.ts +1 -1
  359. package/utils/react.d.ts +9 -6
  360. package/utils/text.d.ts +3 -0
  361. package/utils/types.d.ts +83 -34
  362. package/utils/web.d.ts +1 -0
  363. package/webpack/common/FormText.d.ts +2 -0
  364. package/webpack/common/classes.d.ts +1 -2
  365. package/webpack/common/components.d.ts +161 -30
  366. package/webpack/common/index.d.ts +1 -4
  367. package/webpack/common/internal.d.ts +2 -2
  368. package/webpack/common/menu.d.ts +2 -2
  369. package/webpack/common/react.d.ts +3 -1
  370. package/webpack/common/stores.d.ts +18 -23
  371. package/webpack/common/userSettings.d.ts +4 -0
  372. package/webpack/common/utils.d.ts +46 -33
  373. package/webpack/index.d.ts +1 -0
  374. package/webpack/patchWebpack.d.ts +12 -1
  375. package/webpack/types.d.ts +17 -0
  376. package/webpack/webpack.d.ts +68 -37
  377. package/VencordNative.d.ts +0 -42
  378. package/components/Badge.d.ts +0 -5
  379. package/components/DonateButton.d.ts +0 -2
  380. package/components/ExpandableHeader.d.ts +0 -12
  381. package/components/PluginSettings/ContributorModal.d.ts +0 -3
  382. package/components/PluginSettings/PluginModal.d.ts +0 -9
  383. package/components/PluginSettings/components/SettingBooleanComponent.d.ts +0 -4
  384. package/components/PluginSettings/components/SettingCustomComponent.d.ts +0 -4
  385. package/components/PluginSettings/components/SettingNumericComponent.d.ts +0 -4
  386. package/components/PluginSettings/components/SettingSelectComponent.d.ts +0 -4
  387. package/components/PluginSettings/components/SettingSliderComponent.d.ts +0 -5
  388. package/components/PluginSettings/components/SettingTextComponent.d.ts +0 -4
  389. package/components/PluginSettings/components/index.d.ts +0 -19
  390. package/components/PluginSettings/index.d.ts +0 -12
  391. package/components/VencordSettings/VencordTab.d.ts +0 -3
  392. package/plugins/automodContext/index.d.ts +0 -20
  393. package/plugins/banger/index.d.ts +0 -25
  394. package/plugins/clearURLs/defaultRules.d.ts +0 -1
  395. package/plugins/moreCommands/index.d.ts +0 -26
  396. package/plugins/moreKaomoji/index.d.ts +0 -18
  397. package/plugins/moreUserTags/index.d.ts +0 -77
  398. package/plugins/moyai/index.d.ts +0 -113
  399. package/plugins/pronoundb/components/PronounsAboutComponent.d.ts +0 -2
  400. package/plugins/pronoundb/index.d.ts +0 -113
  401. package/plugins/pronoundb/pronoundbUtils.d.ts +0 -18
  402. package/plugins/pronoundb/settings.d.ts +0 -87
  403. package/plugins/pronoundb/types.d.ts +0 -31
  404. package/plugins/resurrectHome/index.d.ts +0 -63
  405. package/plugins/serverProfile/GuildProfileModal.d.ts +0 -3
  406. package/plugins/timeBarAllActivities/index.d.ts +0 -16
  407. package/plugins/urbanDictionary/index.d.ts +0 -38
  408. package/plugins/userVoiceShow/components/VoiceChannelSection.d.ts +0 -10
  409. package/plugins/wikisearch/index.d.ts +0 -23
  410. package/webpack/common/settingsStores.d.ts +0 -4
  411. package/webpack/common/types/classes.d.ts +0 -39
  412. package/webpack/common/types/components.d.ts +0 -460
  413. package/webpack/common/types/fluxEvents.d.ts +0 -40
  414. package/webpack/common/types/i18nMessages.d.ts +0 -2
  415. package/webpack/common/types/index.d.ts +0 -26
  416. package/webpack/common/types/menu.d.ts +0 -91
  417. package/webpack/common/types/settingsStores.d.ts +0 -5
  418. package/webpack/common/types/stores.d.ts +0 -201
  419. package/webpack/common/types/utils.d.ts +0 -226
  420. /package/plugins/{xsOverlay.desktop → xsOverlay}/native.d.ts +0 -0
package/Vencord.d.ts CHANGED
@@ -15,6 +15,7 @@
15
15
  * You should have received a copy of the GNU General Public License
16
16
  * along with this program. If not, see <https://www.gnu.org/licenses/>.
17
17
  */
18
+ import "~plugins";
18
19
  export * as Api from "./api";
19
20
  export * as Components from "./components";
20
21
  export * as Plugins from "./plugins";
@@ -22,6 +23,7 @@ export * as Util from "./utils";
22
23
  export * as QuickCss from "./utils/quickCss";
23
24
  export * as Updater from "./utils/updater";
24
25
  export * as Webpack from "./webpack";
26
+ export * as WebpackPatcher from "./webpack/patchWebpack";
25
27
  export { PlainSettings, Settings };
26
28
  import "./utils/quickCss";
27
29
  import "./webpack/patchWebpack";
package/api/Badges.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- import { User } from "discord-types/general";
2
1
  import { ComponentType, HTMLProps } from "react";
3
2
  export declare const enum BadgePosition {
4
3
  START = 0,
@@ -13,7 +12,9 @@ export interface ProfileBadge {
13
12
  image?: string;
14
13
  link?: string;
15
14
  /** Action to perform when you click the badge */
16
- onClick?(event: React.MouseEvent<HTMLButtonElement, MouseEvent>, props: BadgeUserArgs): void;
15
+ onClick?(event: React.MouseEvent, props: ProfileBadge & BadgeUserArgs): void;
16
+ /** Action to perform when you right click the badge */
17
+ onContextMenu?(event: React.MouseEvent, props: BadgeUserArgs & BadgeUserArgs): void;
17
18
  /** Should the user display this badge? */
18
19
  shouldShow?(userInfo: BadgeUserArgs): boolean;
19
20
  /** Optional props (e.g. style) for the badge, ignored for component badges */
@@ -22,23 +23,27 @@ export interface ProfileBadge {
22
23
  position?: BadgePosition;
23
24
  /** The badge name to display, Discord uses this. Required for component badges */
24
25
  key?: string;
26
+ /**
27
+ * Allows dynamically returning multiple badges
28
+ */
29
+ getBadges?(userInfo: BadgeUserArgs): ProfileBadge[];
25
30
  }
26
31
  /**
27
32
  * Register a new badge with the Badges API
28
33
  * @param badge The badge to register
29
34
  */
30
- export declare function addBadge(badge: ProfileBadge): void;
35
+ export declare function addProfileBadge(badge: ProfileBadge): void;
31
36
  /**
32
37
  * Unregister a badge from the Badges API
33
38
  * @param badge The badge to remove
34
39
  */
35
- export declare function removeBadge(badge: ProfileBadge): boolean;
40
+ export declare function removeProfileBadge(badge: ProfileBadge): boolean;
36
41
  /**
37
42
  * Inject badges into the profile badges array.
38
43
  * You probably don't need to use this.
39
44
  */
40
45
  export declare function _getBadges(args: BadgeUserArgs): ProfileBadge[];
41
46
  export interface BadgeUserArgs {
42
- user: User;
47
+ userId: string;
43
48
  guildId: string;
44
49
  }
@@ -1,6 +1,6 @@
1
1
  import "./ChatButton.css";
2
- import { Channel } from "discord-types/general";
3
- import { HTMLProps, MouseEventHandler, ReactNode } from "react";
2
+ import { Channel } from "@vencord/discord-types";
3
+ import { HTMLProps, JSX, MouseEventHandler, ReactNode } from "react";
4
4
  export interface ChatBarProps {
5
5
  channel: Channel;
6
6
  disabled: boolean;
@@ -58,17 +58,18 @@ export interface ChatBarProps {
58
58
  sedReplace: boolean;
59
59
  };
60
60
  }
61
- export type ChatBarButton = (props: ChatBarProps & {
61
+ export type ChatBarButtonFactory = (props: ChatBarProps & {
62
62
  isMainChat: boolean;
63
63
  }) => JSX.Element | null;
64
64
  export declare function _injectButtons(buttons: ReactNode[], props: ChatBarProps): void;
65
- export declare const addChatBarButton: (id: string, button: ChatBarButton) => Map<string, ChatBarButton>;
65
+ export declare const addChatBarButton: (id: string, button: ChatBarButtonFactory) => Map<string, ChatBarButtonFactory>;
66
66
  export declare const removeChatBarButton: (id: string) => boolean;
67
67
  export interface ChatBarButtonProps {
68
68
  children: ReactNode;
69
69
  tooltip: string;
70
70
  onClick: MouseEventHandler<HTMLButtonElement>;
71
71
  onContextMenu?: MouseEventHandler<HTMLButtonElement>;
72
- buttonProps?: Omit<HTMLProps<HTMLButtonElement>, "size" | "onClick" | "onContextMenu">;
72
+ onAuxClick?: MouseEventHandler<HTMLButtonElement>;
73
+ buttonProps?: Omit<HTMLProps<HTMLButtonElement>, "size" | "onClick" | "onContextMenu" | "onAuxClick">;
73
74
  }
74
75
  export declare const ChatBarButton: import("react").FunctionComponent<ChatBarButtonProps>;
@@ -1,6 +1,5 @@
1
- import { Message } from "discord-types/general";
1
+ import { CommandArgument, Message } from "@vencord/discord-types";
2
2
  import type { PartialDeep } from "type-fest";
3
- import { Argument } from "./types";
4
3
  export declare function generateId(): string;
5
4
  /**
6
5
  * Send a message as Clyde
@@ -16,5 +15,5 @@ export declare function sendBotMessage(channelId: string, message: PartialDeep<M
16
15
  * @param fallbackValue Fallback value in case this option wasn't passed
17
16
  * @returns Value
18
17
  */
19
- export declare function findOption<T>(args: Argument[], name: string): T & {} | undefined;
20
- export declare function findOption<T>(args: Argument[], name: string, fallbackValue: T): T & {};
18
+ export declare function findOption<T>(args: CommandArgument[], name: string): T & {} | undefined;
19
+ export declare function findOption<T>(args: CommandArgument[], name: string, fallbackValue: T): T & {};
@@ -1,26 +1,27 @@
1
- import { Command, Option } from "./types";
1
+ import { CommandOption } from "@vencord/discord-types";
2
+ import { VencordCommand } from "./types";
2
3
  export * from "./commandHelpers";
3
4
  export * from "./types";
4
- export declare let BUILT_IN: Command[];
5
- export declare const commands: Record<string, Command>;
5
+ export declare let BUILT_IN: VencordCommand[];
6
+ export declare const commands: Record<string, VencordCommand>;
6
7
  /**
7
8
  * Optional message option named "message" you can use in commands.
8
9
  * Used in "tableflip" or "shrug"
9
10
  * @see {@link RequiredMessageOption}
10
11
  */
11
- export declare let OptionalMessageOption: Option;
12
+ export declare let OptionalMessageOption: CommandOption;
12
13
  /**
13
14
  * Required message option named "message" you can use in commands.
14
15
  * Used in "me"
15
16
  * @see {@link OptionalMessageOption}
16
17
  */
17
- export declare let RequiredMessageOption: Option;
18
+ export declare let RequiredMessageOption: CommandOption;
18
19
  export declare const _init: never;
19
20
  export declare const _handleCommand: never;
20
21
  /**
21
22
  * Prepare a Command Option for Discord by filling missing fields
22
23
  * @param opt
23
24
  */
24
- export declare function prepareOption<O extends Option | Command>(opt: O): O;
25
- export declare function registerCommand<C extends Command>(command: C, plugin: string): void;
25
+ export declare function prepareOption<O extends CommandOption | VencordCommand>(opt: O): O;
26
+ export declare function registerCommand<C extends VencordCommand>(command: C, plugin: string): void;
26
27
  export declare function unregisterCommand(name: string): boolean;
@@ -1,74 +1,5 @@
1
- import { Channel, Guild } from "discord-types/general";
2
- import { Promisable } from "type-fest";
3
- export interface CommandContext {
4
- channel: Channel;
5
- guild?: Guild;
6
- }
7
- export declare const enum ApplicationCommandOptionType {
8
- SUB_COMMAND = 1,
9
- SUB_COMMAND_GROUP = 2,
10
- STRING = 3,
11
- INTEGER = 4,
12
- BOOLEAN = 5,
13
- USER = 6,
14
- CHANNEL = 7,
15
- ROLE = 8,
16
- MENTIONABLE = 9,
17
- NUMBER = 10,
18
- ATTACHMENT = 11
19
- }
20
- export declare const enum ApplicationCommandInputType {
21
- BUILT_IN = 0,
22
- BUILT_IN_TEXT = 1,
23
- BUILT_IN_INTEGRATION = 2,
24
- BOT = 3,
25
- PLACEHOLDER = 4
26
- }
27
- export interface Option {
28
- name: string;
29
- displayName?: string;
30
- type: ApplicationCommandOptionType;
31
- description: string;
32
- displayDescription?: string;
33
- required?: boolean;
34
- options?: Option[];
35
- choices?: Array<ChoicesOption>;
36
- }
37
- export interface ChoicesOption {
38
- label: string;
39
- value: string;
40
- name: string;
41
- displayName?: string;
42
- }
43
- export declare const enum ApplicationCommandType {
44
- CHAT_INPUT = 1,
45
- USER = 2,
46
- MESSAGE = 3
47
- }
48
- export interface CommandReturnValue {
49
- content: string;
50
- /** TODO: implement */
51
- cancel?: boolean;
52
- }
53
- export interface Argument {
54
- type: ApplicationCommandOptionType;
55
- name: string;
56
- value: string;
57
- focused: undefined;
58
- options: Argument[];
59
- }
60
- export interface Command {
61
- id?: string;
62
- applicationId?: string;
63
- type?: ApplicationCommandType;
64
- inputType?: ApplicationCommandInputType;
65
- plugin?: string;
1
+ import { Command } from "@vencord/discord-types";
2
+ export { ApplicationCommandInputType, ApplicationCommandOptionType, ApplicationCommandType } from "@vencord/discord-types/enums";
3
+ export interface VencordCommand extends Command {
66
4
  isVencordCommand?: boolean;
67
- name: string;
68
- displayName?: string;
69
- description: string;
70
- displayDescription?: string;
71
- options?: Option[];
72
- predicate?(ctx: CommandContext): boolean;
73
- execute(args: Argument[], ctx: CommandContext): Promisable<void | CommandReturnValue>;
74
5
  }
@@ -3,13 +3,13 @@ import type { ReactElement } from "react";
3
3
  * @param children The rendered context menu elements
4
4
  * @param args Any arguments passed into making the context menu, like the guild, channel, user or message for example
5
5
  */
6
- export type NavContextMenuPatchCallback = (children: Array<ReactElement | null>, ...args: Array<any>) => void;
6
+ export type NavContextMenuPatchCallback = (children: Array<ReactElement<any> | null>, ...args: Array<any>) => void;
7
7
  /**
8
8
  * @param navId The navId of the context menu being patched
9
9
  * @param children The rendered context menu elements
10
10
  * @param args Any arguments passed into making the context menu, like the guild, channel, user or message for example
11
11
  */
12
- export type GlobalContextMenuPatchCallback = (navId: string, children: Array<ReactElement | null>, ...args: Array<any>) => void;
12
+ export type GlobalContextMenuPatchCallback = (navId: string, children: Array<ReactElement<any> | null>, ...args: Array<any>) => void;
13
13
  export declare const navPatches: Map<string, Set<NavContextMenuPatchCallback>>;
14
14
  export declare const globalPatches: Set<GlobalContextMenuPatchCallback>;
15
15
  /**
@@ -40,12 +40,13 @@ export declare function removeGlobalContextMenuPatch(patch: GlobalContextMenuPat
40
40
  * A helper function for finding the children array of a group nested inside a context menu based on the id(s) of its children
41
41
  * @param id The id of the child. If an array is specified, all ids will be tried
42
42
  * @param children The context menu children
43
+ * @param matchSubstring Whether to check if the id is a substring of the child id
43
44
  */
44
- export declare function findGroupChildrenByChildId(id: string | string[], children: Array<ReactElement | null>): Array<ReactElement | null> | null;
45
+ export declare function findGroupChildrenByChildId(id: string | string[], children: Array<ReactElement<any> | null | undefined>, matchSubstring?: boolean): Array<ReactElement<any> | null | undefined> | null;
45
46
  interface ContextMenuProps {
46
- contextMenuApiArguments?: Array<any>;
47
+ contextMenuAPIArguments?: Array<any>;
47
48
  navId: string;
48
- children: Array<ReactElement | null>;
49
+ children: Array<ReactElement<any> | null>;
49
50
  "aria-label": string;
50
51
  onSelect: (() => void) | undefined;
51
52
  onClose: (callback: (...args: Array<any>) => any) => void;
@@ -1,32 +1,20 @@
1
- /// <reference types="react" />
2
- import { Channel, User } from "discord-types/general/index.js";
1
+ import { Channel, User } from "@vencord/discord-types";
2
+ import { JSX } from "react";
3
3
  interface DecoratorProps {
4
- activities: any[];
5
- channel: Channel;
6
- /**
7
- * Only for DM members
8
- */
9
- channelName?: string;
10
- /**
11
- * Only for server members
12
- */
13
- currentUser?: User;
14
- guildId?: string;
15
- isMobile: boolean;
16
- isOwner?: boolean;
17
- isTyping: boolean;
18
- selected: boolean;
19
- status: string;
4
+ type: "guild" | "dm";
20
5
  user: User;
21
- [key: string]: any;
6
+ /** only present when this is a DM list item */
7
+ channel: Channel;
8
+ /** only present when this is a guild list item */
9
+ isOwner: boolean;
22
10
  }
23
- export type Decorator = (props: DecoratorProps) => JSX.Element | null;
11
+ export type MemberListDecoratorFactory = (props: DecoratorProps) => JSX.Element | null;
24
12
  type OnlyIn = "guilds" | "dms";
25
- export declare const decorators: Map<string, {
26
- decorator: Decorator;
27
- onlyIn?: OnlyIn | undefined;
13
+ export declare const decoratorsFactories: Map<string, {
14
+ render: MemberListDecoratorFactory;
15
+ onlyIn?: OnlyIn;
28
16
  }>;
29
- export declare function addDecorator(identifier: string, decorator: Decorator, onlyIn?: OnlyIn): void;
30
- export declare function removeDecorator(identifier: string): void;
31
- export declare function __getDecorators(props: DecoratorProps): (JSX.Element | null)[];
17
+ export declare function addMemberListDecorator(identifier: string, render: MemberListDecoratorFactory, onlyIn?: OnlyIn): void;
18
+ export declare function removeMemberListDecorator(identifier: string): void;
19
+ export declare function __getDecorators(props: DecoratorProps, type: "guild" | "dm"): JSX.Element;
32
20
  export {};
@@ -1,10 +1,10 @@
1
- /// <reference types="react" />
2
- export type AccessoryCallback = (props: Record<string, any>) => JSX.Element | null | Array<JSX.Element | null>;
3
- export type Accessory = {
4
- callback: AccessoryCallback;
1
+ import { JSX, ReactNode } from "react";
2
+ export type MessageAccessoryFactory = (props: Record<string, any>) => ReactNode;
3
+ export type MessageAccessory = {
4
+ render: MessageAccessoryFactory;
5
5
  position?: number;
6
6
  };
7
- export declare const accessories: Map<String, Accessory>;
8
- export declare function addAccessory(identifier: string, callback: AccessoryCallback, position?: number): void;
9
- export declare function removeAccessory(identifier: string): void;
7
+ export declare const accessories: Map<string, MessageAccessory>;
8
+ export declare function addMessageAccessory(identifier: string, render: MessageAccessoryFactory, position?: number): void;
9
+ export declare function removeMessageAccessory(identifier: string): void;
10
10
  export declare function _modifyAccessories(elements: JSX.Element[], props: Record<string, any>): JSX.Element[];
@@ -1,6 +1,6 @@
1
- /// <reference types="react" />
2
- import { Channel, Message } from "discord-types/general/index.js";
3
- interface DecorationProps {
1
+ import { Channel, Message } from "@vencord/discord-types";
2
+ import { JSX } from "react";
3
+ export interface MessageDecorationProps {
4
4
  author: {
5
5
  /**
6
6
  * Will be username if the user has no nickname
@@ -26,9 +26,8 @@ interface DecorationProps {
26
26
  message: Message;
27
27
  [key: string]: any;
28
28
  }
29
- export type Decoration = (props: DecorationProps) => JSX.Element | null;
30
- export declare const decorations: Map<string, Decoration>;
31
- export declare function addDecoration(identifier: string, decoration: Decoration): void;
32
- export declare function removeDecoration(identifier: string): void;
33
- export declare function __addDecorationsToMessage(props: DecorationProps): (JSX.Element | null)[];
34
- export {};
29
+ export type MessageDecorationFactory = (props: MessageDecorationProps) => JSX.Element | null;
30
+ export declare const decorationsFactories: Map<string, MessageDecorationFactory>;
31
+ export declare function addMessageDecoration(identifier: string, decoration: MessageDecorationFactory): void;
32
+ export declare function removeMessageDecoration(identifier: string): void;
33
+ export declare function __addDecorationsToMessage(props: MessageDecorationProps): JSX.Element;
@@ -1,5 +1,4 @@
1
- import { CustomEmoji } from "../webpack/common/types";
2
- import type { Channel, Message } from "discord-types/general";
1
+ import type { Channel, CloudUpload, CustomEmoji, Message } from "@vencord/discord-types";
3
2
  import type { Promisable } from "type-fest";
4
3
  export interface MessageObject {
5
4
  content: string;
@@ -7,29 +6,6 @@ export interface MessageObject {
7
6
  invalidEmojis: any[];
8
7
  tts: boolean;
9
8
  }
10
- export interface Upload {
11
- classification: string;
12
- currentSize: number;
13
- description: string | null;
14
- filename: string;
15
- id: string;
16
- isImage: boolean;
17
- isVideo: boolean;
18
- item: {
19
- file: File;
20
- platform: number;
21
- };
22
- loaded: number;
23
- mimeType: string;
24
- preCompressionSize: number;
25
- responseUrl: string;
26
- sensitive: boolean;
27
- showLargeMessageDialog: boolean;
28
- spoiler: boolean;
29
- status: "NOT_STARTED" | "STARTED" | "UPLOADING" | "ERROR" | "COMPLETED" | "CANCELLED";
30
- uniqueId: string;
31
- uploadedFilename: string;
32
- }
33
9
  export interface MessageReplyOptions {
34
10
  messageReference: Message["messageReference"];
35
11
  allowedMentions?: {
@@ -37,35 +13,34 @@ export interface MessageReplyOptions {
37
13
  repliedUser: boolean;
38
14
  };
39
15
  }
40
- export interface MessageExtra {
16
+ export interface MessageOptions {
41
17
  stickers?: string[];
42
- uploads?: Upload[];
18
+ uploads?: CloudUpload[];
43
19
  replyOptions: MessageReplyOptions;
44
20
  content: string;
45
21
  channel: Channel;
46
22
  type?: any;
47
23
  openWarningPopout: (props: any) => any;
48
24
  }
49
- export type SendListener = (channelId: string, messageObj: MessageObject, extra: MessageExtra) => Promisable<void | {
25
+ export type MessageSendListener = (channelId: string, messageObj: MessageObject, options: MessageOptions) => Promisable<void | {
50
26
  cancel: boolean;
51
27
  }>;
52
- export type EditListener = (channelId: string, messageId: string, messageObj: MessageObject) => Promisable<void | {
28
+ export type MessageEditListener = (channelId: string, messageId: string, messageObj: MessageObject) => Promisable<void | {
53
29
  cancel: boolean;
54
30
  }>;
55
- export declare function _handlePreSend(channelId: string, messageObj: MessageObject, extra: MessageExtra, replyOptions: MessageReplyOptions): Promise<boolean>;
31
+ export declare function _handlePreSend(channelId: string, messageObj: MessageObject, options: MessageOptions, replyOptions: MessageReplyOptions): Promise<boolean>;
56
32
  export declare function _handlePreEdit(channelId: string, messageId: string, messageObj: MessageObject): Promise<boolean>;
57
33
  /**
58
34
  * Note: This event fires off before a message is sent, allowing you to edit the message.
59
35
  */
60
- export declare function addPreSendListener(listener: SendListener): SendListener;
36
+ export declare function addMessagePreSendListener(listener: MessageSendListener): MessageSendListener;
61
37
  /**
62
38
  * Note: This event fires off before a message's edit is applied, allowing you to further edit the message.
63
39
  */
64
- export declare function addPreEditListener(listener: EditListener): EditListener;
65
- export declare function removePreSendListener(listener: SendListener): boolean;
66
- export declare function removePreEditListener(listener: EditListener): boolean;
67
- type ClickListener = (message: Message, channel: Channel, event: MouseEvent) => void;
40
+ export declare function addMessagePreEditListener(listener: MessageEditListener): MessageEditListener;
41
+ export declare function removeMessagePreSendListener(listener: MessageSendListener): boolean;
42
+ export declare function removeMessagePreEditListener(listener: MessageEditListener): boolean;
43
+ export type MessageClickListener = (message: Message, channel: Channel, event: MouseEvent) => void;
68
44
  export declare function _handleClick(message: Message, channel: Channel, event: MouseEvent): void;
69
- export declare function addClickListener(listener: ClickListener): ClickListener;
70
- export declare function removeClickListener(listener: ClickListener): boolean;
71
- export {};
45
+ export declare function addMessageClickListener(listener: MessageClickListener): MessageClickListener;
46
+ export declare function removeMessageClickListener(listener: MessageClickListener): boolean;
@@ -1,16 +1,16 @@
1
- import { Channel, Message } from "discord-types/general";
2
- import type { MouseEventHandler } from "react";
3
- export interface ButtonItem {
1
+ import { Channel, Message } from "@vencord/discord-types";
2
+ import type { ComponentType, MouseEventHandler } from "react";
3
+ export interface MessagePopoverButtonItem {
4
4
  key?: string;
5
5
  label: string;
6
- icon: React.ComponentType<any>;
6
+ icon: ComponentType<any>;
7
7
  message: Message;
8
8
  channel: Channel;
9
9
  onClick?: MouseEventHandler<HTMLButtonElement>;
10
10
  onContextMenu?: MouseEventHandler<HTMLButtonElement>;
11
11
  }
12
- export type getButtonItem = (message: Message) => ButtonItem | null;
13
- export declare const buttons: Map<string, getButtonItem>;
14
- export declare function addButton(identifier: string, item: getButtonItem): void;
15
- export declare function removeButton(identifier: string): void;
16
- export declare function _buildPopoverElements(msg: Message, makeButton: (item: ButtonItem) => React.ComponentType): import("react").ComponentType<{}>[];
12
+ export type MessagePopoverButtonFactory = (message: Message) => MessagePopoverButtonItem | null;
13
+ export declare const buttons: Map<string, MessagePopoverButtonFactory>;
14
+ export declare function addMessagePopoverButton(identifier: string, item: MessagePopoverButtonFactory): void;
15
+ export declare function removeMessagePopoverButton(identifier: string): void;
16
+ export declare function _buildPopoverElements(Component: React.ComponentType<MessagePopoverButtonItem>, message: Message): import("react").JSX.Element;
@@ -0,0 +1,8 @@
1
+ import { Message } from "@vencord/discord-types";
2
+ /**
3
+ * Update and re-render a message
4
+ * @param channelId The channel id of the message
5
+ * @param messageId The message id
6
+ * @param fields The fields of the message to change. Leave empty if you just want to re-render
7
+ */
8
+ export declare function updateMessage(channelId: string, messageId: string, fields?: Partial<Message & Record<string, any>>): void;
package/api/Notices.d.ts CHANGED
@@ -1,5 +1,6 @@
1
+ import { ReactNode } from "react";
1
2
  export declare const noticesQueue: any[];
2
3
  export declare let currentNotice: any;
3
4
  export declare function popNotice(): void;
4
5
  export declare function nextNotice(): void;
5
- export declare function showNotice(message: string, buttonText: string, onOkClick: () => void): void;
6
+ export declare function showNotice(message: ReactNode, buttonText: string, onOkClick: () => void): void;
@@ -1,7 +1,6 @@
1
- /// <reference types="react" />
2
1
  import "./styles.css";
3
2
  import { NotificationData } from "./Notifications";
4
3
  declare const _default: import("react").FunctionComponent<NotificationData & {
5
- className?: string | undefined;
4
+ className?: string;
6
5
  }>;
7
6
  export default _default;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { NotificationData } from "./Notifications";
3
2
  interface PersistentNotificationData extends Pick<NotificationData, "title" | "body" | "image" | "icon" | "color"> {
4
3
  timestamp: number;
@@ -10,6 +9,6 @@ export declare function useLogs(): readonly [PersistentNotificationData[], boole
10
9
  export declare function NotificationLog({ log, pending }: {
11
10
  log: PersistentNotificationData[];
12
11
  pending: boolean;
13
- }): JSX.Element;
12
+ }): import("react").JSX.Element;
14
13
  export declare function openNotificationLogModal(): void;
15
14
  export {};
@@ -1,8 +1,8 @@
1
- /// <reference types="react" />
1
+ import { ComponentType } from "react";
2
2
  export declare const enum ServerListRenderPosition {
3
3
  Above = 0,
4
4
  In = 1
5
5
  }
6
- export declare function addServerListElement(position: ServerListRenderPosition, renderFunction: Function): void;
7
- export declare function removeServerListElement(position: ServerListRenderPosition, renderFunction: Function): void;
8
- export declare const renderAll: (position: ServerListRenderPosition) => JSX.Element[];
6
+ export declare function addServerListElement(position: ServerListRenderPosition, renderFunction: ComponentType): void;
7
+ export declare function removeServerListElement(position: ServerListRenderPosition, renderFunction: ComponentType): void;
8
+ export declare const renderAll: (position: ServerListRenderPosition) => import("react").JSX.Element[];
package/api/Settings.d.ts CHANGED
@@ -4,9 +4,10 @@ export interface Settings {
4
4
  autoUpdate: boolean;
5
5
  autoUpdateNotification: boolean;
6
6
  useQuickCss: boolean;
7
+ eagerPatches: boolean;
8
+ enabledThemes: string[];
7
9
  enableReactDevtools: boolean;
8
10
  themeLinks: string[];
9
- enabledThemes: string[];
10
11
  frameless: boolean;
11
12
  transparent: boolean;
12
13
  winCtrlQ: boolean;
@@ -57,6 +58,7 @@ export declare const Settings: Settings;
57
58
  */
58
59
  export declare function useSettings(paths?: UseSettings<Settings>[]): Settings;
59
60
  export declare function migratePluginSettings(name: string, ...oldNames: string[]): void;
61
+ export declare function migratePluginSetting(pluginName: string, oldSetting: string, newSetting: string): void;
60
62
  export declare function definePluginSettings<Def extends SettingsDefinition, Checks extends SettingsChecks<Def>, PrivateSettings extends object = {}>(def: Def, checks?: Checks): DefinedSettings<Def, Checks, PrivateSettings>;
61
63
  type UseSettings<T extends object> = ResolveUseSettings<T>[keyof T];
62
64
  type ResolveUseSettings<T extends object> = {
package/api/Styles.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- /// <reference types="../src/globals" />
2
1
  import type { MapValue } from "type-fest/source/entry";
3
2
  export type Style = MapValue<typeof VencordStyles>;
4
3
  export declare const styleMap: Map<string, {
@@ -0,0 +1,40 @@
1
+ interface UserSettingDefinition<T> {
2
+ /**
3
+ * Get the setting value
4
+ */
5
+ getSetting(): T;
6
+ /**
7
+ * Update the setting value
8
+ * @param value The new value
9
+ */
10
+ updateSetting(value: T): Promise<void>;
11
+ /**
12
+ * Update the setting value
13
+ * @param value A callback that accepts the old value as the first argument, and returns the new value
14
+ */
15
+ updateSetting(value: (old: T) => T): Promise<void>;
16
+ /**
17
+ * Stateful React hook for this setting value
18
+ */
19
+ useSetting(): T;
20
+ userSettingsAPIGroup: string;
21
+ userSettingsAPIName: string;
22
+ }
23
+ export declare const UserSettings: Record<PropertyKey, UserSettingDefinition<any>> | undefined;
24
+ /**
25
+ * Get the setting with the given setting group and name.
26
+ *
27
+ * @param group The setting group
28
+ * @param name The name of the setting
29
+ */
30
+ export declare function getUserSetting<T = any>(group: string, name: string): UserSettingDefinition<T> | undefined;
31
+ /**
32
+ * {@link getUserSettingDefinition}, lazy.
33
+ *
34
+ * Get the setting with the given setting group and name.
35
+ *
36
+ * @param group The setting group
37
+ * @param name The name of the setting
38
+ */
39
+ export declare function getUserSettingLazy<T = any>(group: string, name: string): UserSettingDefinition<T> | undefined;
40
+ export {};
package/api/index.d.ts CHANGED
@@ -8,11 +8,13 @@ import * as $MessageAccessories from "./MessageAccessories";
8
8
  import * as $MessageDecorations from "./MessageDecorations";
9
9
  import * as $MessageEventsAPI from "./MessageEvents";
10
10
  import * as $MessagePopover from "./MessagePopover";
11
+ import * as $MessageUpdater from "./MessageUpdater";
11
12
  import * as $Notices from "./Notices";
12
13
  import * as $Notifications from "./Notifications";
13
14
  import * as $ServerList from "./ServerList";
14
15
  import * as $Settings from "./Settings";
15
16
  import * as $Styles from "./Styles";
17
+ import * as $UserSettings from "./UserSettings";
16
18
  /**
17
19
  * An API allowing you to listen to Message Clicks or run your own logic
18
20
  * before a message is sent
@@ -89,3 +91,11 @@ export declare const ContextMenu: typeof $ContextMenu;
89
91
  * An API allowing you to add buttons to the chat input
90
92
  */
91
93
  export declare const ChatButtons: typeof $ChatButtons;
94
+ /**
95
+ * An API allowing you to update and re-render messages
96
+ */
97
+ export declare const MessageUpdater: typeof $MessageUpdater;
98
+ /**
99
+ * An API allowing you to get an user setting
100
+ */
101
+ export declare const UserSettings: typeof $UserSettings;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  interface TextInputProps {
3
2
  /**
4
3
  * WARNING: Changing this between renders will have no effect!
@@ -19,5 +18,5 @@ interface TextInputProps {
19
18
  * A very simple wrapper around Discord's TextInput that validates input and shows
20
19
  * the user an error message and only calls your onChange when the input is valid
21
20
  */
22
- export declare function CheckedTextInput({ value: initialValue, onChange, validate }: TextInputProps): JSX.Element;
21
+ export declare function CheckedTextInput({ value: initialValue, onChange, validate }: TextInputProps): import("react").JSX.Element;
23
22
  export {};
@@ -1,8 +1,7 @@
1
- /// <reference types="react" />
2
1
  /**
3
2
  * Renders code in a Discord codeblock
4
3
  */
5
4
  export declare function CodeBlock(props: {
6
5
  content?: string;
7
6
  lang: string;
8
- }): JSX.Element;
7
+ }): import("react").JSX.Element;