@vencord/types 0.1.1 → 1.8.4

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 (442) hide show
  1. package/Vencord.d.ts +28 -28
  2. package/VencordNative.d.ts +42 -14
  3. package/api/Badges.d.ts +44 -62
  4. package/api/ChatButtons.d.ts +74 -0
  5. package/api/Commands/commandHelpers.d.ts +20 -20
  6. package/api/Commands/index.d.ts +26 -26
  7. package/api/Commands/types.d.ts +74 -74
  8. package/api/ContextMenu.d.ts +54 -57
  9. package/api/DataStore/index.d.ts +96 -96
  10. package/api/MemberListDecorators.d.ts +32 -33
  11. package/api/MessageAccessories.d.ts +10 -10
  12. package/api/MessageDecorations.d.ts +34 -34
  13. package/api/MessageEvents.d.ts +71 -39
  14. package/api/MessagePopover.d.ts +16 -16
  15. package/api/Notices.d.ts +5 -5
  16. package/api/Notifications/NotificationComponent.d.ts +7 -7
  17. package/api/Notifications/Notifications.d.ts +25 -25
  18. package/api/Notifications/index.d.ts +1 -1
  19. package/api/Notifications/notificationLog.d.ts +15 -15
  20. package/api/ServerList.d.ts +8 -8
  21. package/api/{settings.d.ts → Settings.d.ts} +65 -76
  22. package/api/Styles.d.ts +98 -97
  23. package/api/index.d.ts +91 -86
  24. package/components/Badge.d.ts +5 -5
  25. package/components/CheckedTextInput.d.ts +23 -23
  26. package/components/CodeBlock.d.ts +8 -0
  27. package/components/DonateButton.d.ts +2 -2
  28. package/components/ErrorBoundary.d.ts +25 -26
  29. package/components/ErrorCard.d.ts +3 -3
  30. package/components/ExpandableHeader.d.ts +12 -0
  31. package/components/Flex.d.ts +6 -6
  32. package/components/Heart.d.ts +2 -2
  33. package/components/Icons.d.ts +36 -0
  34. package/components/Link.d.ts +6 -6
  35. package/components/PluginSettings/ContributorModal.d.ts +3 -0
  36. package/components/PluginSettings/PluginModal.d.ts +9 -9
  37. package/components/PluginSettings/components/SettingBooleanComponent.d.ts +4 -4
  38. package/components/PluginSettings/components/SettingCustomComponent.d.ts +4 -4
  39. package/components/PluginSettings/components/SettingNumericComponent.d.ts +4 -4
  40. package/components/PluginSettings/components/SettingSelectComponent.d.ts +4 -4
  41. package/components/PluginSettings/components/SettingSliderComponent.d.ts +5 -5
  42. package/components/PluginSettings/components/SettingTextComponent.d.ts +4 -4
  43. package/components/PluginSettings/components/index.d.ts +19 -19
  44. package/components/PluginSettings/index.d.ts +12 -4
  45. package/components/Switch.d.ts +9 -9
  46. package/components/VencordSettings/AddonCard.d.ts +17 -0
  47. package/components/VencordSettings/{BackupRestoreTab.d.ts → BackupAndRestoreTab.d.ts} +3 -3
  48. package/components/VencordSettings/CloudTab.d.ts +3 -3
  49. package/components/VencordSettings/{Updater.d.ts → PatchHelperTab.d.ts} +3 -3
  50. package/components/VencordSettings/PluginsTab.d.ts +3 -3
  51. package/components/VencordSettings/ThemesTab.d.ts +3 -3
  52. package/components/{PatchHelper.d.ts → VencordSettings/UpdaterTab.d.ts} +4 -3
  53. package/components/VencordSettings/VencordTab.d.ts +3 -3
  54. package/components/VencordSettings/shared.d.ts +9 -0
  55. package/components/handleComponentFailed.d.ts +1 -1
  56. package/components/index.d.ts +12 -3
  57. package/globals.d.ts +0 -48
  58. package/modules.d.ts +5 -0
  59. package/package.json +4 -2
  60. package/plugins/{apiBadges.d.ts → _api/badges/index.d.ts} +37 -36
  61. package/plugins/{apiServerList.d.ts → _api/chatButtons.d.ts} +16 -16
  62. package/plugins/{apiCommands.d.ts → _api/commands.d.ts} +28 -28
  63. package/plugins/{apiContextMenu.d.ts → _api/contextMenu.d.ts} +25 -25
  64. package/plugins/{noTrack.d.ts → _api/memberListDecorators.d.ts} +22 -23
  65. package/plugins/{alwaysTrust.d.ts → _api/messageAccessories.d.ts} +16 -16
  66. package/plugins/{apiMessageDecorations.d.ts → _api/messageDecorations.d.ts} +16 -16
  67. package/plugins/{apiMessageAccessories.d.ts → _api/messageEvents.d.ts} +16 -16
  68. package/plugins/{apiMessagePopover.d.ts → _api/messagePopover.d.ts} +16 -16
  69. package/plugins/_api/notices.d.ts +17 -0
  70. package/plugins/{apiMemberListDecorators.d.ts → _api/serverList.d.ts} +16 -16
  71. package/plugins/_core/noTrack.d.ts +55 -0
  72. package/plugins/_core/settings.d.ts +69 -0
  73. package/plugins/_core/supportHelper.d.ts +31 -0
  74. package/plugins/{colorSighted.d.ts → alwaysAnimate/index.d.ts} +26 -22
  75. package/plugins/alwaysTrust/index.d.ts +45 -0
  76. package/plugins/anonymiseFileNames/index.d.ts +96 -0
  77. package/plugins/{arRPC.web.d.ts → arRPC.web/index.d.ts} +14 -13
  78. package/plugins/automodContext/index.d.ts +20 -0
  79. package/plugins/{banger.d.ts → banger/index.d.ts} +25 -25
  80. package/plugins/betterFolders/FolderSideBar.d.ts +3 -3
  81. package/plugins/betterFolders/index.d.ts +272 -71
  82. package/plugins/{betterGifAltText.d.ts → betterGifAltText/index.d.ts} +17 -17
  83. package/plugins/{apiSettingsStore.d.ts → betterGifPicker/index.d.ts} +16 -16
  84. package/plugins/{betterNotes.d.ts → betterNotes/index.d.ts} +45 -41
  85. package/plugins/betterRoleContext/index.d.ts +16 -0
  86. package/plugins/{betterRoleDot.d.ts → betterRoleDot/index.d.ts} +53 -35
  87. package/plugins/betterSessions/components/RenameButton.d.ts +6 -0
  88. package/plugins/betterSessions/components/RenameModal.d.ts +8 -0
  89. package/plugins/betterSessions/components/icons.d.ts +10 -0
  90. package/plugins/betterSessions/index.d.ts +67 -0
  91. package/plugins/betterSessions/types.d.ts +13 -0
  92. package/plugins/betterSessions/utils.d.ts +11 -0
  93. package/plugins/betterSettings/index.d.ts +91 -0
  94. package/plugins/betterUploadButton/index.d.ts +16 -0
  95. package/plugins/biggerStreamPreview/index.d.ts +48 -0
  96. package/plugins/biggerStreamPreview/webpack/stores.d.ts +3 -0
  97. package/plugins/biggerStreamPreview/webpack/types/stores.d.ts +60 -0
  98. package/plugins/{blurNsfw.d.ts → blurNsfw/index.d.ts} +28 -28
  99. package/plugins/{callTimer.d.ts → callTimer/index.d.ts} +40 -40
  100. package/plugins/clearURLs/defaultRules.d.ts +1 -1
  101. package/plugins/clearURLs/index.d.ts +18 -18
  102. package/plugins/clientTheme/index.d.ts +42 -0
  103. package/plugins/colorSighted/index.d.ts +16 -0
  104. package/plugins/consoleShortcuts/index.d.ts +191 -0
  105. package/plugins/copyUserURLs/index.d.ts +13 -0
  106. package/plugins/{crashHandler.d.ts → crashHandler/index.d.ts} +43 -44
  107. package/plugins/{noReplyMention.d.ts → ctrlEnterSend/index.d.ts} +34 -31
  108. package/plugins/customRPC/index.d.ts +274 -0
  109. package/plugins/dearrow/index.d.ts +94 -0
  110. package/plugins/decor/index.d.ts +77 -0
  111. package/plugins/decor/lib/api.d.ts +27 -0
  112. package/plugins/decor/lib/constants.d.ts +10 -0
  113. package/plugins/decor/lib/stores/AuthorizationStore.d.ts +1 -0
  114. package/plugins/decor/lib/stores/CurrentUserDecorationsStore.d.ts +1 -0
  115. package/plugins/decor/lib/stores/UsersDecorationsStore.d.ts +4 -0
  116. package/plugins/decor/lib/utils/decoration.d.ts +4 -0
  117. package/plugins/decor/settings.d.ts +27 -0
  118. package/plugins/decor/ui/components/DecorDecorationGridDecoration.d.ts +9 -0
  119. package/plugins/decor/ui/components/DecorSection.d.ts +7 -0
  120. package/plugins/decor/ui/components/DecorationContextMenu.d.ts +5 -0
  121. package/plugins/decor/ui/components/DecorationGridCreate.d.ts +6 -0
  122. package/plugins/decor/ui/components/DecorationGridNone.d.ts +7 -0
  123. package/plugins/decor/ui/components/Grid.d.ts +8 -0
  124. package/plugins/decor/ui/components/SectionedGridList.d.ts +12 -0
  125. package/plugins/decor/ui/components/index.d.ts +17 -0
  126. package/plugins/decor/ui/index.d.ts +4 -0
  127. package/plugins/decor/ui/modals/ChangeDecorationModal.d.ts +1 -0
  128. package/plugins/decor/ui/modals/CreateDecorationModal.d.ts +1 -0
  129. package/plugins/decor/ui/modals/GuidelinesModal.d.ts +1 -0
  130. package/plugins/{messageClickActions.d.ts → devCompanion.dev/index.d.ts} +28 -25
  131. package/plugins/disableCallIdle/index.d.ts +16 -0
  132. package/plugins/emoteCloner/index.d.ts +15 -0
  133. package/plugins/{experiments.d.ts → experiments/index.d.ts} +55 -51
  134. package/plugins/{f8break.d.ts → f8break/index.d.ts} +12 -12
  135. package/plugins/{fakeNitro.d.ts → fakeNitro/index.d.ts} +241 -140
  136. package/plugins/{fakeProfileThemes.d.ts → fakeProfileThemes/index.d.ts} +58 -44
  137. package/plugins/favEmojiFirst/index.d.ts +31 -0
  138. package/plugins/favGifSearch/index.d.ts +121 -0
  139. package/plugins/{noF1.d.ts → fixCodeblockGap/index.d.ts} +16 -16
  140. package/plugins/fixSpotifyEmbeds.desktop/index.d.ts +19 -0
  141. package/plugins/fixSpotifyEmbeds.desktop/native.d.ts +1 -0
  142. package/plugins/{emoteCloner.d.ts → fixYoutubeEmbeds.desktop/index.d.ts} +9 -11
  143. package/plugins/fixYoutubeEmbeds.desktop/native.d.ts +1 -0
  144. package/plugins/forceOwnerCrown/index.d.ts +23 -0
  145. package/plugins/friendInvites/index.d.ts +34 -0
  146. package/plugins/{fixInbox.d.ts → friendsSince/index.d.ts} +20 -18
  147. package/plugins/gameActivityToggle/index.d.ts +34 -21
  148. package/plugins/{gifPaste.d.ts → gifPaste/index.d.ts} +19 -19
  149. package/plugins/{welcomeStickerPicker.d.ts → greetStickerPicker/index.d.ts} +58 -47
  150. package/plugins/{hideAttachments.d.ts → hideAttachments/index.d.ts} +14 -14
  151. package/plugins/iLoveSpam/index.d.ts +16 -0
  152. package/plugins/ignoreActivities/index.d.ts +127 -0
  153. package/plugins/imageLink/index.d.ts +16 -0
  154. package/plugins/imageZoom/components/Magnifier.d.ts +7 -7
  155. package/plugins/imageZoom/constants.d.ts +1 -1
  156. package/plugins/imageZoom/index.d.ts +220 -122
  157. package/plugins/imageZoom/utils/waitFor.d.ts +1 -1
  158. package/plugins/implicitRelationships/index.d.ts +36 -0
  159. package/plugins/index.d.ts +17 -13
  160. package/plugins/{invisibleChat → invisibleChat.desktop}/components/DecryptionModal.d.ts +3 -3
  161. package/plugins/{invisibleChat → invisibleChat.desktop}/components/EncryptionModal.d.ts +1 -1
  162. package/plugins/{invisibleChat → invisibleChat.desktop}/index.d.ts +47 -42
  163. package/plugins/keepCurrentChannel/index.d.ts +24 -0
  164. package/plugins/lastfm/index.d.ts +186 -0
  165. package/plugins/loadingQuotes/index.d.ts +37 -0
  166. package/plugins/memberCount/MemberCount.d.ts +5 -0
  167. package/plugins/memberCount/OnlineMemberCountStore.d.ts +18 -0
  168. package/plugins/memberCount/index.d.ts +66 -0
  169. package/plugins/messageClickActions/index.d.ts +56 -0
  170. package/plugins/messageLatency/index.d.ts +61 -0
  171. package/plugins/messageLinkEmbeds/index.d.ts +97 -0
  172. package/plugins/messageLogger/index.d.ts +95 -58
  173. package/plugins/{messageTags.d.ts → messageTags/index.d.ts} +38 -38
  174. package/plugins/{moreCommands.d.ts → moreCommands/index.d.ts} +26 -26
  175. package/plugins/{moreKaomoji.d.ts → moreKaomoji/index.d.ts} +18 -18
  176. package/plugins/{moreUserTags.d.ts → moreUserTags/index.d.ts} +77 -51
  177. package/plugins/moyai/index.d.ts +113 -0
  178. package/plugins/mutualGroupDMs/index.d.ts +22 -0
  179. package/plugins/newGuildSettings/index.d.ts +108 -0
  180. package/plugins/{noBlockedMessages.d.ts → noBlockedMessages/index.d.ts} +33 -33
  181. package/plugins/noDefaultHangStatus/index.d.ts +16 -0
  182. package/plugins/noDevtoolsWarning/index.d.ts +16 -0
  183. package/plugins/noF1/index.d.ts +16 -0
  184. package/plugins/{spotifyCrack.d.ts → noMosaic/index.d.ts} +41 -38
  185. package/plugins/noPendingCount/index.d.ts +58 -0
  186. package/plugins/noProfileThemes/index.d.ts +16 -0
  187. package/plugins/noRPC.discordDesktop/index.d.ts +16 -0
  188. package/plugins/noReplyMention/index.d.ts +68 -0
  189. package/plugins/noScreensharePreview/index.d.ts +16 -0
  190. package/plugins/{viewIcons.d.ts → noServerEmojis/index.d.ts} +39 -36
  191. package/plugins/{noSystemBadge.discordDesktop.d.ts → noSystemBadge.discordDesktop/index.d.ts} +16 -16
  192. package/plugins/noTypingAnimation/index.d.ts +16 -0
  193. package/plugins/noUnblockToJump/index.d.ts +16 -0
  194. package/plugins/{alwaysAnimate.d.ts → normalizeMessageLinks/index.d.ts} +17 -17
  195. package/plugins/notificationVolume/index.d.ts +34 -0
  196. package/plugins/nsfwGateBypass/index.d.ts +16 -0
  197. package/plugins/onePingPerDM/index.d.ts +68 -0
  198. package/plugins/{searchReply.d.ts → oneko/index.d.ts} +11 -11
  199. package/plugins/openInApp/index.d.ts +75 -0
  200. package/plugins/openInApp/native.d.ts +3 -0
  201. package/plugins/overrideForumDefaults/index.d.ts +74 -0
  202. package/plugins/partyMode/index.d.ts +51 -0
  203. package/plugins/pauseInvitesForever/index.d.ts +20 -0
  204. package/plugins/permissionFreeWill/index.d.ts +45 -0
  205. package/plugins/permissionsViewer/components/RolesAndUsersPermissions.d.ts +15 -0
  206. package/plugins/permissionsViewer/components/UserPermissions.d.ts +8 -0
  207. package/plugins/permissionsViewer/components/icons.d.ts +4 -0
  208. package/plugins/permissionsViewer/index.d.ts +110 -0
  209. package/plugins/permissionsViewer/utils.d.ts +11 -0
  210. package/plugins/{petpet.d.ts → petpet/index.d.ts} +38 -38
  211. package/plugins/{typingIndicator.d.ts → pictureInPicture/index.d.ts} +35 -31
  212. package/plugins/pinDms/components/CreateCategoryModal.d.ts +11 -0
  213. package/plugins/pinDms/components/contextMenu.d.ts +5 -0
  214. package/plugins/pinDms/constants.d.ts +3 -0
  215. package/plugins/pinDms/data.d.ts +29 -0
  216. package/plugins/pinDms/index.d.ts +175 -47
  217. package/plugins/{plainFolderIcon.d.ts → plainFolderIcon/index.d.ts} +16 -16
  218. package/plugins/{platformIndicators.d.ts → platformIndicators/index.d.ts} +39 -46
  219. package/plugins/{fxTwitter.d.ts → previewMessage/index.d.ts} +15 -14
  220. package/plugins/pronoundb/components/PronounsAboutComponent.d.ts +2 -2
  221. package/plugins/pronoundb/components/PronounsChatComponent.d.ts +11 -11
  222. package/plugins/pronoundb/index.d.ts +113 -59
  223. package/plugins/pronoundb/pronoundbUtils.d.ts +18 -5
  224. package/plugins/pronoundb/settings.d.ts +87 -0
  225. package/plugins/pronoundb/types.d.ts +31 -34
  226. package/plugins/{quickMention.d.ts → quickMention/index.d.ts} +14 -14
  227. package/plugins/{quickReply.d.ts → quickReply/index.d.ts} +46 -32
  228. package/plugins/{unminifyErrors.d.ts → reactErrorDecoder/index.d.ts} +19 -19
  229. package/plugins/{readAllNotificationsButton.d.ts → readAllNotificationsButton/index.d.ts} +15 -14
  230. package/plugins/relationshipNotifier/functions.d.ts +7 -7
  231. package/plugins/relationshipNotifier/index.d.ts +96 -53
  232. package/plugins/relationshipNotifier/settings.d.ts +65 -34
  233. package/plugins/relationshipNotifier/types.d.ts +39 -37
  234. package/plugins/relationshipNotifier/utils.d.ts +10 -10
  235. package/plugins/replaceGoogleSearch/index.d.ts +37 -0
  236. package/plugins/replyTimestamp/index.d.ts +34 -0
  237. package/plugins/resurrectHome/index.d.ts +63 -0
  238. package/plugins/{revealAllSpoilers.d.ts → revealAllSpoilers/index.d.ts} +17 -17
  239. package/plugins/{reverseImageSearch.d.ts → reverseImageSearch/index.d.ts} +22 -18
  240. package/plugins/reviewDB/auth.d.ts +7 -0
  241. package/plugins/reviewDB/components/BlockedUserModal.d.ts +1 -0
  242. package/plugins/reviewDB/components/MessageButton.d.ts +11 -3
  243. package/plugins/reviewDB/components/ReviewBadge.d.ts +5 -3
  244. package/plugins/reviewDB/components/ReviewComponent.d.ts +8 -7
  245. package/plugins/reviewDB/components/ReviewModal.d.ts +1 -0
  246. package/plugins/reviewDB/components/ReviewsView.d.ts +22 -4
  247. package/plugins/reviewDB/entities.d.ts +72 -0
  248. package/plugins/reviewDB/index.d.ts +98 -34
  249. package/plugins/reviewDB/reviewDbApi.d.ts +18 -0
  250. package/plugins/reviewDB/settings.d.ts +68 -0
  251. package/plugins/reviewDB/utils.d.ts +6 -0
  252. package/plugins/{roleColorEverywhere.d.ts → roleColorEverywhere/index.d.ts} +83 -63
  253. package/plugins/searchReply/index.d.ts +13 -0
  254. package/plugins/secretRingTone/index.d.ts +16 -0
  255. package/plugins/sendTimestamps/index.d.ts +29 -23
  256. package/plugins/{serverListIndicators.d.ts → serverListIndicators/index.d.ts} +42 -37
  257. package/plugins/serverProfile/GuildProfileModal.d.ts +3 -0
  258. package/plugins/serverProfile/index.d.ts +15 -0
  259. package/plugins/{shikiCodeblocks → shikiCodeblocks.desktop}/api/languages.d.ts +28 -28
  260. package/plugins/{shikiCodeblocks → shikiCodeblocks.desktop}/api/shiki.d.ts +51 -51
  261. package/plugins/{shikiCodeblocks → shikiCodeblocks.desktop}/api/themes.d.ts +37 -37
  262. package/plugins/{shikiCodeblocks → shikiCodeblocks.desktop}/components/ButtonRow.d.ts +6 -6
  263. package/plugins/{shikiCodeblocks → shikiCodeblocks.desktop}/components/Code.d.ts +11 -11
  264. package/plugins/{shikiCodeblocks → shikiCodeblocks.desktop}/components/CopyButton.d.ts +5 -5
  265. package/plugins/{shikiCodeblocks → shikiCodeblocks.desktop}/components/Header.d.ts +9 -9
  266. package/plugins/{shikiCodeblocks → shikiCodeblocks.desktop}/components/Highlighter.d.ts +15 -15
  267. package/plugins/{shikiCodeblocks → shikiCodeblocks.desktop}/hooks/useCopyCooldown.d.ts +1 -1
  268. package/plugins/{shikiCodeblocks → shikiCodeblocks.desktop}/hooks/useShikiSettings.d.ts +16 -16
  269. package/plugins/{shikiCodeblocks → shikiCodeblocks.desktop}/hooks/useTheme.d.ts +8 -8
  270. package/plugins/shikiCodeblocks.desktop/index.d.ts +247 -0
  271. package/plugins/{shikiCodeblocks → shikiCodeblocks.desktop}/previewExample.d.ts +5 -5
  272. package/plugins/shikiCodeblocks.desktop/settings.d.ts +173 -0
  273. package/plugins/{shikiCodeblocks → shikiCodeblocks.desktop}/types.d.ts +42 -42
  274. package/plugins/{shikiCodeblocks → shikiCodeblocks.desktop}/utils/color.d.ts +1 -1
  275. package/plugins/{shikiCodeblocks → shikiCodeblocks.desktop}/utils/createStyle.d.ts +3 -3
  276. package/plugins/{shikiCodeblocks → shikiCodeblocks.desktop}/utils/misc.d.ts +7 -7
  277. package/plugins/showAllMessageButtons/index.d.ts +16 -0
  278. package/plugins/showConnections/VerifiedIcon.d.ts +2 -0
  279. package/plugins/showConnections/index.d.ts +63 -0
  280. package/plugins/showHiddenChannels/components/HiddenChannelLockScreen.d.ts +33 -34
  281. package/plugins/showHiddenChannels/index.d.ts +195 -110
  282. package/plugins/showHiddenThings/index.d.ts +81 -0
  283. package/plugins/showMeYourName/index.d.ts +79 -49
  284. package/plugins/showTimeoutDuration/index.d.ts +58 -0
  285. package/plugins/silentMessageToggle/index.d.ts +39 -0
  286. package/plugins/silentTyping/index.d.ts +74 -0
  287. package/plugins/sortFriendRequests/index.d.ts +45 -0
  288. package/plugins/spotifyControls/PlayerComponent.d.ts +3 -3
  289. package/plugins/spotifyControls/SpotifyStore.d.ts +23 -0
  290. package/plugins/spotifyControls/index.d.ts +42 -33
  291. package/plugins/spotifyCrack/index.d.ts +51 -0
  292. package/plugins/{spotifyShareCommands.d.ts → spotifyShareCommands/index.d.ts} +18 -18
  293. package/plugins/startupTimings/StartupTimingPage.d.ts +3 -3
  294. package/plugins/startupTimings/index.d.ts +18 -18
  295. package/plugins/streamerModeOnStream/index.d.ts +13 -0
  296. package/plugins/superReactionTweaks/index.d.ts +107 -0
  297. package/plugins/textReplace/index.d.ts +27 -0
  298. package/plugins/themeAttributes/index.d.ts +27 -0
  299. package/plugins/timeBarAllActivities/index.d.ts +16 -0
  300. package/plugins/translate/TranslateIcon.d.ts +8 -0
  301. package/plugins/translate/TranslateModal.d.ts +5 -0
  302. package/plugins/translate/TranslationAccessory.d.ts +7 -0
  303. package/plugins/translate/index.d.ts +92 -0
  304. package/plugins/translate/languages.d.ts +137 -0
  305. package/plugins/translate/settings.d.ts +74 -0
  306. package/plugins/translate/utils.d.ts +6 -0
  307. package/plugins/typingIndicator/index.d.ts +83 -0
  308. package/plugins/{typingTweaks.d.ts → typingTweaks/index.d.ts} +72 -51
  309. package/plugins/{unindent.d.ts → unindent/index.d.ts} +22 -22
  310. package/plugins/unlockedAvatarZoom/index.d.ts +32 -0
  311. package/plugins/unsuppressEmbeds/index.d.ts +13 -0
  312. package/plugins/urbanDictionary/index.d.ts +38 -0
  313. package/plugins/userVoiceShow/components/VoiceChannelSection.d.ts +10 -10
  314. package/plugins/userVoiceShow/index.d.ts +47 -36
  315. package/plugins/usrbg/index.d.ts +87 -36
  316. package/plugins/validReply/index.d.ts +35 -0
  317. package/plugins/validUser/index.d.ts +19 -0
  318. package/plugins/{vcDoubleClick.d.ts → vcDoubleClick/index.d.ts} +26 -26
  319. package/plugins/{vcNarrator.d.ts → vcNarrator/index.d.ts} +33 -18
  320. package/plugins/vencordToolbox/index.d.ts +21 -0
  321. package/plugins/viewIcons/index.d.ts +88 -0
  322. package/plugins/viewRaw/index.d.ts +48 -0
  323. package/plugins/voiceDownload/index.d.ts +20 -0
  324. package/plugins/voiceMessages/DesktopRecorder.d.ts +2 -0
  325. package/plugins/voiceMessages/VoicePreview.d.ts +7 -0
  326. package/plugins/voiceMessages/WebRecorder.d.ts +2 -0
  327. package/plugins/voiceMessages/index.d.ts +42 -0
  328. package/plugins/voiceMessages/native.d.ts +1 -0
  329. package/plugins/voiceMessages/settings.d.ts +24 -0
  330. package/plugins/voiceMessages/utils.d.ts +1 -0
  331. package/plugins/{volumeBooster.discordDesktop.d.ts → volumeBooster.discordDesktop/index.d.ts} +46 -38
  332. package/plugins/{webContextMenus.web.d.ts → webContextMenus.web/index.d.ts} +75 -48
  333. package/plugins/{oneko.d.ts → webKeybinds.web/index.d.ts} +13 -11
  334. package/plugins/webScreenShareFixes.web/index.d.ts +17 -0
  335. package/plugins/whoReacted/index.d.ts +40 -0
  336. package/plugins/{wikisearch.d.ts → wikisearch/index.d.ts} +23 -23
  337. package/plugins/xsOverlay.desktop/index.d.ts +197 -0
  338. package/plugins/xsOverlay.desktop/native.d.ts +1 -0
  339. package/shared/IpcEvents.d.ts +25 -0
  340. package/shared/SettingsStore.d.ts +77 -0
  341. package/{utils → shared}/debounce.d.ts +8 -8
  342. package/{utils → shared}/onceDefined.d.ts +11 -11
  343. package/shared/vencordUserAgent.d.ts +5 -0
  344. package/utils/ChangeList.d.ts +10 -10
  345. package/utils/Logger.d.ts +21 -21
  346. package/utils/Queue.d.ts +33 -33
  347. package/utils/cloud.d.ts +7 -7
  348. package/utils/constants.d.ts +490 -254
  349. package/utils/dependencies.d.ts +43 -41
  350. package/utils/discord.d.ts +46 -10
  351. package/utils/guards.d.ts +2 -2
  352. package/utils/index.d.ts +36 -30
  353. package/utils/lazy.d.ts +12 -0
  354. package/utils/lazyReact.d.ts +8 -0
  355. package/utils/localStorage.d.ts +1 -1
  356. package/utils/margins.d.ts +1 -1
  357. package/utils/mergeDefaults.d.ts +7 -0
  358. package/utils/misc.d.ts +31 -80
  359. package/utils/modal.d.ts +158 -149
  360. package/utils/native.d.ts +2 -2
  361. package/utils/onlyOnce.d.ts +1 -0
  362. package/utils/patches.d.ts +6 -5
  363. package/utils/quickCss.d.ts +1 -1
  364. package/utils/react.d.ts +36 -7
  365. package/utils/settingsSync.d.ts +9 -7
  366. package/utils/text.d.ts +35 -20
  367. package/utils/types.d.ts +273 -222
  368. package/utils/updater.d.ts +10 -11
  369. package/utils/web-metadata.d.ts +2 -0
  370. package/utils/web.d.ts +11 -1
  371. package/webpack/common/classes.d.ts +3 -0
  372. package/webpack/common/components.d.ts +33 -22
  373. package/webpack/common/index.d.ts +10 -8
  374. package/webpack/common/internal.d.ts +4 -4
  375. package/webpack/common/menu.d.ts +3 -3
  376. package/webpack/common/react.d.ts +8 -8
  377. package/webpack/common/settingsStores.d.ts +4 -0
  378. package/webpack/common/stores.d.ts +38 -37
  379. package/webpack/common/types/classes.d.ts +39 -0
  380. package/webpack/common/types/components.d.ts +140 -7
  381. package/webpack/common/types/i18nMessages.d.ts +2 -2
  382. package/webpack/common/types/index.d.ts +3 -1
  383. package/webpack/common/types/menu.d.ts +16 -8
  384. package/webpack/common/types/settingsStores.d.ts +5 -0
  385. package/webpack/common/types/stores.d.ts +161 -0
  386. package/webpack/common/types/utils.d.ts +119 -6
  387. package/webpack/common/utils.d.ts +68 -47
  388. package/webpack/index.d.ts +2 -2
  389. package/webpack/patchWebpack.d.ts +1 -1
  390. package/webpack/webpack.d.ts +155 -105
  391. package/api/SettingsStore.d.ts +0 -28
  392. package/components/Monaco.d.ts +0 -1
  393. package/components/VencordSettings/index.d.ts +0 -7
  394. package/plugins/anonymiseFileNames.d.ts +0 -50
  395. package/plugins/apiMessageEvents.d.ts +0 -22
  396. package/plugins/apiNotices.d.ts +0 -20
  397. package/plugins/betterUploadButton.d.ts +0 -16
  398. package/plugins/consoleShortcuts.d.ts +0 -47
  399. package/plugins/customRPC.d.ts +0 -97
  400. package/plugins/devCompanion.dev.d.ts +0 -19
  401. package/plugins/disableDMCallIdle.d.ts +0 -16
  402. package/plugins/fart.d.ts +0 -34
  403. package/plugins/forceOwnerCrown.d.ts +0 -17
  404. package/plugins/friendInvites.d.ts +0 -22
  405. package/plugins/highResAvatars.d.ts +0 -16
  406. package/plugins/iLoveSpam.d.ts +0 -16
  407. package/plugins/ignoreActivities.d.ts +0 -30
  408. package/plugins/keepCurrentChannel.d.ts +0 -30
  409. package/plugins/lastfm.d.ts +0 -90
  410. package/plugins/loadingQuotes.d.ts +0 -18
  411. package/plugins/memberCount.d.ts +0 -26
  412. package/plugins/messageLinkEmbeds.d.ts +0 -45
  413. package/plugins/moyai.d.ts +0 -58
  414. package/plugins/muteNewGuild.d.ts +0 -18
  415. package/plugins/noCanaryMessageLinks.d.ts +0 -29
  416. package/plugins/noDevtoolsWarning.d.ts +0 -16
  417. package/plugins/noRPC.discordDesktop.d.ts +0 -16
  418. package/plugins/noScreensharePreview.d.ts +0 -16
  419. package/plugins/noUnblockToJump.d.ts +0 -16
  420. package/plugins/nsfwGateBypass.d.ts +0 -16
  421. package/plugins/pinDms/contextMenus.d.ts +0 -2
  422. package/plugins/pinDms/settings.d.ts +0 -26
  423. package/plugins/pronoundb/components/PronounsProfileWrapper.d.ts +0 -3
  424. package/plugins/relationshipNotifier/events.d.ts +0 -3
  425. package/plugins/reviewDB/Utils/ReviewDBAPI.d.ts +0 -13
  426. package/plugins/reviewDB/Utils/Utils.d.ts +0 -6
  427. package/plugins/reviewDB/entities/Badge.d.ts +0 -7
  428. package/plugins/reviewDB/entities/Review.d.ts +0 -14
  429. package/plugins/settings.d.ts +0 -61
  430. package/plugins/shikiCodeblocks/index.d.ts +0 -132
  431. package/plugins/shikiCodeblocks/settings.d.ts +0 -58
  432. package/plugins/silentMessageToggle.d.ts +0 -31
  433. package/plugins/silentTyping.d.ts +0 -59
  434. package/plugins/sortFriendRequests.d.ts +0 -34
  435. package/plugins/supportHelper.d.ts +0 -21
  436. package/plugins/timeBarAllActivities.d.ts +0 -16
  437. package/plugins/urbanDictionary.d.ts +0 -24
  438. package/plugins/uwuify.d.ts +0 -18
  439. package/plugins/viewRaw.d.ts +0 -12
  440. package/plugins/whoReacted.d.ts +0 -120
  441. package/utils/IpcEvents.d.ts +0 -16
  442. package/utils/proxyLazy.d.ts +0 -10
package/Vencord.d.ts CHANGED
@@ -1,28 +1,28 @@
1
- /*!
2
- * Vencord, a modification for Discord's desktop app
3
- * Copyright (c) 2022 Vendicated and contributors
4
- *
5
- * This program is free software: you can redistribute it and/or modify
6
- * it under the terms of the GNU General Public License as published by
7
- * the Free Software Foundation, either version 3 of the License, or
8
- * (at your option) any later version.
9
- *
10
- * This program is distributed in the hope that it will be useful,
11
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
- * GNU General Public License for more details.
14
- *
15
- * You should have received a copy of the GNU General Public License
16
- * along with this program. If not, see <https://www.gnu.org/licenses/>.
17
- */
18
- export * as Api from "./api";
19
- export * as Plugins from "./plugins";
20
- export * as Util from "./utils";
21
- export * as QuickCss from "./utils/quickCss";
22
- export * as Updater from "./utils/updater";
23
- export * as Webpack from "./webpack";
24
- export { PlainSettings, Settings };
25
- import "./utils/quickCss";
26
- import "./webpack/patchWebpack";
27
- import { PlainSettings, Settings } from "./api/settings";
28
- export declare let Components: any;
1
+ /*!
2
+ * Vencord, a modification for Discord's desktop app
3
+ * Copyright (c) 2022 Vendicated and contributors
4
+ *
5
+ * This program is free software: you can redistribute it and/or modify
6
+ * it under the terms of the GNU General Public License as published by
7
+ * the Free Software Foundation, either version 3 of the License, or
8
+ * (at your option) any later version.
9
+ *
10
+ * This program is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ * GNU General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU General Public License
16
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
17
+ */
18
+ export * as Api from "./api";
19
+ export * as Components from "./components";
20
+ export * as Plugins from "./plugins";
21
+ export * as Util from "./utils";
22
+ export * as QuickCss from "./utils/quickCss";
23
+ export * as Updater from "./utils/updater";
24
+ export * as Webpack from "./webpack";
25
+ export { PlainSettings, Settings };
26
+ import "./utils/quickCss";
27
+ import "./webpack/patchWebpack";
28
+ import { PlainSettings, Settings } from "./api/Settings";
@@ -1,14 +1,42 @@
1
- /// <reference types="standalone-electron-types" />
2
- /// <reference types="node" />
3
- import { IpcRenderer } from "electron";
4
- declare const _default: {
5
- getVersions: () => NodeJS.ProcessVersions;
6
- ipc: {
7
- send(event: string, ...args: any[]): void;
8
- sendSync<T = any>(event: string, ...args: any[]): T;
9
- on(event: string, listener: Parameters<IpcRenderer["on"]>[1]): void;
10
- off(event: string, listener: Parameters<IpcRenderer["off"]>[1]): void;
11
- invoke<T_1 = any>(event: string, ...args: any[]): Promise<T_1>;
12
- };
13
- };
14
- export default _default;
1
+ /// <reference types="standalone-electron-types" />
2
+ /// <reference types="node" />
3
+ import type { UserThemeHeader } from "./main/themes";
4
+ import { IpcEvents } from "./shared/IpcEvents";
5
+ import { IpcRes } from "./utils/types";
6
+ import type { Settings } from "api/Settings";
7
+ export declare function sendSync<T = any>(event: IpcEvents, ...args: any[]): T;
8
+ declare const _default: {
9
+ themes: {
10
+ uploadTheme: (fileName: string, fileData: string) => Promise<void>;
11
+ deleteTheme: (fileName: string) => Promise<void>;
12
+ getThemesDir: () => Promise<string>;
13
+ getThemesList: () => Promise<UserThemeHeader[]>;
14
+ getThemeData: (fileName: string) => Promise<string | undefined>;
15
+ getSystemValues: () => Promise<Record<string, string>>;
16
+ };
17
+ updater: {
18
+ getUpdates: () => Promise<IpcRes<Record<"author" | "message" | "hash", string>[]>>;
19
+ update: () => Promise<IpcRes<boolean>>;
20
+ rebuild: () => Promise<IpcRes<boolean>>;
21
+ getRepo: () => Promise<IpcRes<string>>;
22
+ };
23
+ settings: {
24
+ get: () => Settings;
25
+ set: (settings: Settings, pathToNotify?: string) => Promise<void>;
26
+ getSettingsDir: () => Promise<string>;
27
+ };
28
+ quickCss: {
29
+ get: () => Promise<string>;
30
+ set: (css: string) => Promise<void>;
31
+ addChangeListener(cb: (newCss: string) => void): void;
32
+ addThemeChangeListener(cb: () => void): void;
33
+ openFile: () => Promise<void>;
34
+ openEditor: () => Promise<void>;
35
+ };
36
+ native: {
37
+ getVersions: () => Partial<NodeJS.ProcessVersions>;
38
+ openExternal: (url: string) => Promise<void>;
39
+ };
40
+ pluginHelpers: Record<string, Record<string, (...args: any[]) => Promise<any>>>;
41
+ };
42
+ export default _default;
package/api/Badges.d.ts CHANGED
@@ -1,62 +1,44 @@
1
- import { User } from "discord-types/general";
2
- import { ComponentType, HTMLProps } from "react";
3
- export declare enum BadgePosition {
4
- START = 0,
5
- END = 1
6
- }
7
- export interface ProfileBadge {
8
- /** The tooltip to show on hover. Required for image badges */
9
- description?: string;
10
- /** Custom component for the badge (tooltip not included) */
11
- component?: ComponentType<ProfileBadge & BadgeUserArgs>;
12
- /** The custom image to use */
13
- image?: string;
14
- link?: string;
15
- /** Action to perform when you click the badge */
16
- onClick?(): void;
17
- /** Should the user display this badge? */
18
- shouldShow?(userInfo: BadgeUserArgs): boolean;
19
- /** Optional props (e.g. style) for the badge, ignored for component badges */
20
- props?: HTMLProps<HTMLImageElement>;
21
- /** Insert at start or end? */
22
- position?: BadgePosition;
23
- /** The badge name to display, Discord uses this. Required for component badges */
24
- key?: string;
25
- }
26
- /**
27
- * Register a new badge with the Badges API
28
- * @param badge The badge to register
29
- */
30
- export declare function addBadge(badge: ProfileBadge): void;
31
- /**
32
- * Unregister a badge from the Badges API
33
- * @param badge The badge to remove
34
- */
35
- export declare function removeBadge(badge: ProfileBadge): boolean;
36
- /**
37
- * Inject badges into the profile badges array.
38
- * You probably don't need to use this.
39
- */
40
- export declare function _getBadges(args: BadgeUserArgs): ProfileBadge[];
41
- export interface BadgeUserArgs {
42
- user: User;
43
- profile: Profile;
44
- premiumSince: Date;
45
- premiumGuildSince?: Date;
46
- }
47
- interface ConnectedAccount {
48
- type: string;
49
- id: string;
50
- name: string;
51
- verified: boolean;
52
- }
53
- interface Profile {
54
- connectedAccounts: ConnectedAccount[];
55
- premiumType: number;
56
- premiumSince: string;
57
- premiumGuildSince?: any;
58
- lastFetched: number;
59
- profileFetchFailed: boolean;
60
- application?: any;
61
- }
62
- export {};
1
+ import { User } from "discord-types/general";
2
+ import { ComponentType, HTMLProps } from "react";
3
+ export declare const enum BadgePosition {
4
+ START = 0,
5
+ END = 1
6
+ }
7
+ export interface ProfileBadge {
8
+ /** The tooltip to show on hover. Required for image badges */
9
+ description?: string;
10
+ /** Custom component for the badge (tooltip not included) */
11
+ component?: ComponentType<ProfileBadge & BadgeUserArgs>;
12
+ /** The custom image to use */
13
+ image?: string;
14
+ link?: string;
15
+ /** Action to perform when you click the badge */
16
+ onClick?(event: React.MouseEvent<HTMLButtonElement, MouseEvent>, props: BadgeUserArgs): void;
17
+ /** Should the user display this badge? */
18
+ shouldShow?(userInfo: BadgeUserArgs): boolean;
19
+ /** Optional props (e.g. style) for the badge, ignored for component badges */
20
+ props?: HTMLProps<HTMLImageElement>;
21
+ /** Insert at start or end? */
22
+ position?: BadgePosition;
23
+ /** The badge name to display, Discord uses this. Required for component badges */
24
+ key?: string;
25
+ }
26
+ /**
27
+ * Register a new badge with the Badges API
28
+ * @param badge The badge to register
29
+ */
30
+ export declare function addBadge(badge: ProfileBadge): void;
31
+ /**
32
+ * Unregister a badge from the Badges API
33
+ * @param badge The badge to remove
34
+ */
35
+ export declare function removeBadge(badge: ProfileBadge): boolean;
36
+ /**
37
+ * Inject badges into the profile badges array.
38
+ * You probably don't need to use this.
39
+ */
40
+ export declare function _getBadges(args: BadgeUserArgs): ProfileBadge[];
41
+ export interface BadgeUserArgs {
42
+ user: User;
43
+ guildId: string;
44
+ }
@@ -0,0 +1,74 @@
1
+ import "./ChatButton.css";
2
+ import { Channel } from "discord-types/general";
3
+ import { HTMLProps, MouseEventHandler, ReactNode } from "react";
4
+ export interface ChatBarProps {
5
+ channel: Channel;
6
+ disabled: boolean;
7
+ isEmpty: boolean;
8
+ type: {
9
+ analyticsName: string;
10
+ attachments: boolean;
11
+ autocomplete: {
12
+ addReactionShortcut: boolean;
13
+ forceChatLayer: boolean;
14
+ reactions: boolean;
15
+ };
16
+ commands: {
17
+ enabled: boolean;
18
+ };
19
+ drafts: {
20
+ type: number;
21
+ commandType: number;
22
+ autoSave: boolean;
23
+ };
24
+ emojis: {
25
+ button: boolean;
26
+ };
27
+ gifs: {
28
+ button: boolean;
29
+ allowSending: boolean;
30
+ };
31
+ gifts: {
32
+ button: boolean;
33
+ };
34
+ permissions: {
35
+ requireSendMessages: boolean;
36
+ };
37
+ showThreadPromptOnReply: boolean;
38
+ stickers: {
39
+ button: boolean;
40
+ allowSending: boolean;
41
+ autoSuggest: boolean;
42
+ };
43
+ users: {
44
+ allowMentioning: boolean;
45
+ };
46
+ submit: {
47
+ button: boolean;
48
+ ignorePreference: boolean;
49
+ disableEnterToSubmit: boolean;
50
+ clearOnSubmit: boolean;
51
+ useDisabledStylesOnSubmit: boolean;
52
+ };
53
+ uploadLongMessages: boolean;
54
+ upsellLongMessages: {
55
+ iconOnly: boolean;
56
+ };
57
+ showCharacterCount: boolean;
58
+ sedReplace: boolean;
59
+ };
60
+ }
61
+ export type ChatBarButton = (props: ChatBarProps & {
62
+ isMainChat: boolean;
63
+ }) => JSX.Element | null;
64
+ export declare function _injectButtons(buttons: ReactNode[], props: ChatBarProps): void;
65
+ export declare const addChatBarButton: (id: string, button: ChatBarButton) => Map<string, ChatBarButton>;
66
+ export declare const removeChatBarButton: (id: string) => boolean;
67
+ export interface ChatBarButtonProps {
68
+ children: ReactNode;
69
+ tooltip: string;
70
+ onClick: MouseEventHandler<HTMLButtonElement>;
71
+ onContextMenu?: MouseEventHandler<HTMLButtonElement>;
72
+ buttonProps?: Omit<HTMLProps<HTMLButtonElement>, "size" | "onClick" | "onContextMenu">;
73
+ }
74
+ export declare const ChatBarButton: import("react").FunctionComponent<ChatBarButtonProps>;
@@ -1,20 +1,20 @@
1
- import { Message } from "discord-types/general";
2
- import type { PartialDeep } from "type-fest";
3
- import { Argument } from "./types";
4
- export declare function generateId(): string;
5
- /**
6
- * Send a message as Clyde
7
- * @param {string} channelId ID of channel to send message to
8
- * @param {Message} message Message to send
9
- * @returns {Message}
10
- */
11
- export declare function sendBotMessage(channelId: string, message: PartialDeep<Message>): Message;
12
- /**
13
- * Get the value of an option by name
14
- * @param args Arguments array (first argument passed to execute)
15
- * @param name Name of the argument
16
- * @param fallbackValue Fallback value in case this option wasn't passed
17
- * @returns Value
18
- */
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 & {};
1
+ import { Message } from "discord-types/general";
2
+ import type { PartialDeep } from "type-fest";
3
+ import { Argument } from "./types";
4
+ export declare function generateId(): string;
5
+ /**
6
+ * Send a message as Clyde
7
+ * @param {string} channelId ID of channel to send message to
8
+ * @param {Message} message Message to send
9
+ * @returns {Message}
10
+ */
11
+ export declare function sendBotMessage(channelId: string, message: PartialDeep<Message>): Message;
12
+ /**
13
+ * Get the value of an option by name
14
+ * @param args Arguments array (first argument passed to execute)
15
+ * @param name Name of the argument
16
+ * @param fallbackValue Fallback value in case this option wasn't passed
17
+ * @returns Value
18
+ */
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 & {};
@@ -1,26 +1,26 @@
1
- import { Command, Option } from "./types";
2
- export * from "./commandHelpers";
3
- export * from "./types";
4
- export declare let BUILT_IN: Command[];
5
- export declare const commands: Record<string, Command>;
6
- /**
7
- * Optional message option named "message" you can use in commands.
8
- * Used in "tableflip" or "shrug"
9
- * @see {@link RequiredMessageOption}
10
- */
11
- export declare let OptionalMessageOption: Option;
12
- /**
13
- * Required message option named "message" you can use in commands.
14
- * Used in "me"
15
- * @see {@link OptionalMessageOption}
16
- */
17
- export declare let RequiredMessageOption: Option;
18
- export declare const _init: never;
19
- export declare const _handleCommand: never;
20
- /**
21
- * Prepare a Command Option for Discord by filling missing fields
22
- * @param opt
23
- */
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;
26
- export declare function unregisterCommand(name: string): boolean;
1
+ import { Command, Option } from "./types";
2
+ export * from "./commandHelpers";
3
+ export * from "./types";
4
+ export declare let BUILT_IN: Command[];
5
+ export declare const commands: Record<string, Command>;
6
+ /**
7
+ * Optional message option named "message" you can use in commands.
8
+ * Used in "tableflip" or "shrug"
9
+ * @see {@link RequiredMessageOption}
10
+ */
11
+ export declare let OptionalMessageOption: Option;
12
+ /**
13
+ * Required message option named "message" you can use in commands.
14
+ * Used in "me"
15
+ * @see {@link OptionalMessageOption}
16
+ */
17
+ export declare let RequiredMessageOption: Option;
18
+ export declare const _init: never;
19
+ export declare const _handleCommand: never;
20
+ /**
21
+ * Prepare a Command Option for Discord by filling missing fields
22
+ * @param opt
23
+ */
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;
26
+ export declare function unregisterCommand(name: string): boolean;
@@ -1,74 +1,74 @@
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 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 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 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;
66
- 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
- }
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;
66
+ 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
+ }
@@ -1,57 +1,54 @@
1
- import type { ReactElement } from "react";
2
- type ContextMenuPatchCallbackReturn = (() => void) | void;
3
- /**
4
- * @param children The rendered context menu elements
5
- * @param args Any arguments passed into making the context menu, like the guild, channel, user or message for example
6
- * @returns A callback which is only ran once used to modify the context menu elements (Use to avoid duplicates)
7
- */
8
- export type NavContextMenuPatchCallback = (children: Array<React.ReactElement>, ...args: Array<any>) => ContextMenuPatchCallbackReturn;
9
- /**
10
- * @param navId The navId of the context menu being patched
11
- * @param children The rendered context menu elements
12
- * @param args Any arguments passed into making the context menu, like the guild, channel, user or message for example
13
- * @returns A callback which is only ran once used to modify the context menu elements (Use to avoid duplicates)
14
- */
15
- export type GlobalContextMenuPatchCallback = (navId: string, children: Array<React.ReactElement>, ...args: Array<any>) => ContextMenuPatchCallbackReturn;
16
- export declare const navPatches: Map<string, Set<NavContextMenuPatchCallback>>;
17
- export declare const globalPatches: Set<GlobalContextMenuPatchCallback>;
18
- /**
19
- * Add a context menu patch
20
- * @param navId The navId(s) for the context menu(s) to patch
21
- * @param patch The patch to be applied
22
- */
23
- export declare function addContextMenuPatch(navId: string | Array<string>, patch: NavContextMenuPatchCallback): void;
24
- /**
25
- * Add a global context menu patch that fires the patch for all context menus
26
- * @param patch The patch to be applied
27
- */
28
- export declare function addGlobalContextMenuPatch(patch: GlobalContextMenuPatchCallback): void;
29
- /**
30
- * Remove a context menu patch
31
- * @param navId The navId(s) for the context menu(s) to remove the patch
32
- * @param patch The patch to be removed
33
- * @returns Wheter the patch was sucessfully removed from the context menu(s)
34
- */
35
- export declare function removeContextMenuPatch<T extends string | Array<string>>(navId: T, patch: NavContextMenuPatchCallback): T extends string ? boolean : Array<boolean>;
36
- /**
37
- * Remove a global context menu patch
38
- * @param patch The patch to be removed
39
- * @returns Wheter the patch was sucessfully removed
40
- */
41
- export declare function removeGlobalContextMenuPatch(patch: GlobalContextMenuPatchCallback): boolean;
42
- /**
43
- * A helper function for finding the children array of a group nested inside a context menu based on the id of one of its childs
44
- * @param id The id of the child
45
- * @param children The context menu children
46
- */
47
- export declare function findGroupChildrenByChildId(id: string, children: Array<React.ReactElement>, _itemsArray?: Array<React.ReactElement>): Array<React.ReactElement> | null;
48
- interface ContextMenuProps {
49
- contextMenuApiArguments?: Array<any>;
50
- navId: string;
51
- children: Array<ReactElement>;
52
- "aria-label": string;
53
- onSelect: (() => void) | undefined;
54
- onClose: (callback: (...args: Array<any>) => any) => void;
55
- }
56
- export declare function _patchContextMenu(props: ContextMenuProps): void;
57
- export {};
1
+ import type { ReactElement } from "react";
2
+ /**
3
+ * @param children The rendered context menu elements
4
+ * @param args Any arguments passed into making the context menu, like the guild, channel, user or message for example
5
+ */
6
+ export type NavContextMenuPatchCallback = (children: Array<ReactElement | null>, ...args: Array<any>) => void;
7
+ /**
8
+ * @param navId The navId of the context menu being patched
9
+ * @param children The rendered context menu elements
10
+ * @param args Any arguments passed into making the context menu, like the guild, channel, user or message for example
11
+ */
12
+ export type GlobalContextMenuPatchCallback = (navId: string, children: Array<ReactElement | null>, ...args: Array<any>) => void;
13
+ export declare const navPatches: Map<string, Set<NavContextMenuPatchCallback>>;
14
+ export declare const globalPatches: Set<GlobalContextMenuPatchCallback>;
15
+ /**
16
+ * Add a context menu patch
17
+ * @param navId The navId(s) for the context menu(s) to patch
18
+ * @param patch The patch to be applied
19
+ */
20
+ export declare function addContextMenuPatch(navId: string | Array<string>, patch: NavContextMenuPatchCallback): void;
21
+ /**
22
+ * Add a global context menu patch that fires the patch for all context menus
23
+ * @param patch The patch to be applied
24
+ */
25
+ export declare function addGlobalContextMenuPatch(patch: GlobalContextMenuPatchCallback): void;
26
+ /**
27
+ * Remove a context menu patch
28
+ * @param navId The navId(s) for the context menu(s) to remove the patch
29
+ * @param patch The patch to be removed
30
+ * @returns Whether the patch was successfully removed from the context menu(s)
31
+ */
32
+ export declare function removeContextMenuPatch<T extends string | Array<string>>(navId: T, patch: NavContextMenuPatchCallback): T extends string ? boolean : Array<boolean>;
33
+ /**
34
+ * Remove a global context menu patch
35
+ * @param patch The patch to be removed
36
+ * @returns Whether the patch was successfully removed
37
+ */
38
+ export declare function removeGlobalContextMenuPatch(patch: GlobalContextMenuPatchCallback): boolean;
39
+ /**
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
+ * @param id The id of the child. If an array is specified, all ids will be tried
42
+ * @param children The context menu children
43
+ */
44
+ export declare function findGroupChildrenByChildId(id: string | string[], children: Array<ReactElement | null>): Array<ReactElement | null> | null;
45
+ interface ContextMenuProps {
46
+ contextMenuApiArguments?: Array<any>;
47
+ navId: string;
48
+ children: Array<ReactElement | null>;
49
+ "aria-label": string;
50
+ onSelect: (() => void) | undefined;
51
+ onClose: (callback: (...args: Array<any>) => any) => void;
52
+ }
53
+ export declare function _usePatchContextMenu(props: ContextMenuProps): ContextMenuProps;
54
+ export {};