Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/BetterDiscord/BetterDiscord
/ functions
Functions
1,293 in github.com/BetterDiscord/BetterDiscord
⨍
Functions
1,293
◇
Types & classes
302
↓ 290 callers
Function
t
(key: TranslationKey | (string & {}), replacements?: T, formatters?: Partial<Record<keyof T, (value: string) =
src/common/i18n.ts:143
↓ 96 callers
Method
join
* SHows the guild join modal (if the addon has a guild) * @public
src/betterdiscord/modules/addonstore.ts:99
↓ 90 callers
Function
useCallback
(callback: T)
src/betterdiscord/api/reactutils.ts:73
↓ 65 callers
Method
get
(file: Files, key?: string)
src/betterdiscord/stores/json.ts:29
↓ 49 callers
Function
useState
(initial: T | (() => T))
src/betterdiscord/api/reactutils.ts:60
↓ 42 callers
Method
on
(event: string, callback: (...args: any[]) => void)
src/common/events.ts:11
↓ 40 callers
Method
log
* Logs used for basic loggin. * * @param {string} module - Name of the calling module. * @param {...any} message - Messages to have log
src/common/logger.ts:85
↓ 37 callers
Method
error
* Logs an error message. * * @param {string} pluginName Name of the calling module * @param {...any} message Messages to have logge
src/betterdiscord/api/logger.ts:76
↓ 34 callers
Method
createElement
* Utility function to make creating DOM elements easier. Acts similarly * to `React.createElement` * * @param {string} tag HTML tag nam
src/betterdiscord/api/dom.ts:114
↓ 34 callers
Method
createElement
(type: keyof HTMLElementTagNameMap, options: {[prop: string]: any;} = {}, ...children: Array<string | null | H
src/betterdiscord/ui/notices.ts:34
↓ 29 callers
Function
callback
(value: any)
src/betterdiscord/ui/settings/group.tsx:64
↓ 27 callers
Method
get
()
src/betterdiscord/modules/ipc.ts:73
↓ 24 callers
Method
initialize
()
src/betterdiscord/types/discord/modules.d.ts:41
↓ 23 callers
Function
useMemo
(factory: () => T)
src/betterdiscord/api/reactutils.ts:57
↓ 22 callers
Method
createElement
* Utility function to make creating DOM elements easier. * Has backward compatibility with previous createElement implementation.
src/betterdiscord/modules/dommanager.ts:56
↓ 22 callers
Function
getByKeys
(...props: WithOptions<string, WebpackOptions>)
src/betterdiscord/api/webpack.ts:146
↓ 22 callers
Method
show
Shows the tooltip. Automatically called on mouseenter. Will attempt to flip if position was wrong.
src/betterdiscord/ui/tooltip.ts:101
↓ 21 callers
Method
log
* Logs used for basic loggin. * * @param {string} pluginName - Name of the calling module. * @param {...any} message - Messages to h
src/betterdiscord/api/logger.ts:108
↓ 21 callers
Method
on
(collection: string, category: string, identifier: string, callback: (val: unknown) => void)
src/betterdiscord/stores/settings.ts:279
↓ 21 callers
Function
useRef
(value: T | null = null)
src/betterdiscord/api/reactutils.ts:70
↓ 20 callers
Function
findInTree
(tree: Record<string|number, unknown> | null, searchFilter: TreeFilter | string, {walkable = null, ignore = []
src/common/utils/findintree.ts:11
↓ 20 callers
Method
getElement
(e: Node | string, baseElement: Element = document.documentElement)
src/betterdiscord/modules/dommanager.ts:47
↓ 19 callers
Method
remove
()
src/electron/main/modules/csp.ts:10
↓ 19 callers
Method
stacktrace
* Logs an error using a collapsed error group with stacktrace. * * @param {string} pluginName - Name of the calling module. * @param
src/betterdiscord/api/logger.ts:61
↓ 18 callers
Method
off
(event: string, callback: (...args: any[]) => void)
src/common/events.ts:30
↓ 17 callers
Function
parseDeclarations
(moduleString: string, baseDepth = 1)
src/common/parseDeclarations.ts:34
↓ 16 callers
Function
getNestedProp
(object: T, path: string, skipLast?: boolean)
src/common/utils/nested.ts:1
↓ 16 callers
Method
showConfirmationModal
* Shows a generic but very customizable confirmation modal with optional confirm and cancel callbacks. * @param {string} title - title of the mod
src/betterdiscord/ui/modals.ts:170
↓ 16 callers
Function
useStateFromStores
(stores: StoreType | StoreType[], factory: () => T, deps?: React.DependencyList, areStateEqual: true | ((oldSt
src/betterdiscord/ui/hooks.ts:9
↓ 15 callers
Method
after
* This method patches onto another function, allowing your code to run afterwards. * Using this, you are able to modify the return value after th
src/betterdiscord/api/patcher.ts:118
↓ 15 callers
Method
apply
(target, thisArg, argArray)
src/electron/main/modules/browserwindow.ts:94
↓ 15 callers
Method
emitChange
()
src/betterdiscord/types/discord/modules.d.ts:44
↓ 15 callers
Method
open
()
src/editor/types/global.d.ts:12
↓ 15 callers
Method
set
(file: Files, key: Record<string, unknown> | string, value?: unknown)
src/betterdiscord/stores/json.ts:37
↓ 14 callers
Function
useEffect
()
src/betterdiscord/api/reactutils.ts:79
↓ 13 callers
Method
dispatch
(payload: T)
src/betterdiscord/types/discord/modules.d.ts:77
↓ 13 callers
Method
emit
(event: string, ...args: any[])
src/common/events.ts:17
↓ 13 callers
Method
from
* @public * @param {BdWebGuild} guild * @returns {Guild}
src/betterdiscord/modules/addonstore.ts:58
↓ 13 callers
Function
getModule
(filter: Webpack.ModuleFilter, options: Webpack.Options = {})
src/betterdiscord/webpack/searching.ts:38
↓ 13 callers
Method
set
(value: boolean)
src/betterdiscord/modules/ipc.ts:70
↓ 12 callers
Method
escapeID
(id: string)
src/betterdiscord/modules/dommanager.ts:40
↓ 12 callers
Function
extend
(target: T, ...extenders: object[])
src/common/utils/extend.ts:34
↓ 12 callers
Function
formatString
(string: string, values: Record<string, string | object | number | (() => string) | undefined | null>)
src/common/utils/format.ts:9
↓ 12 callers
Method
relaunch
(args?: string[])
src/betterdiscord/modules/ipc.ts:28
↓ 11 callers
Function
getLazy
(filter: Webpack.ModuleFilter, options: Webpack.LazyOptions = {})
src/betterdiscord/webpack/lazy.ts:10
↓ 11 callers
Method
handle
(component: React.ComponentType<any>)
src/betterdiscord/modules/nodepatcher.ts:99
↓ 11 callers
Method
showAddonError
(error: AddonError)
src/betterdiscord/ui/modals.ts:214
↓ 10 callers
Method
parseHTML
* Parses a string of HTML and returns the results. If the second parameter is true, * the parsed HTML will be returned as a document fragment {@s
src/betterdiscord/api/dom.ts:130
↓ 10 callers
Function
resolveColor
(color: string | number, hex = true)
src/betterdiscord/ui/settings/components/color.tsx:16
↓ 10 callers
Method
set
(newPreload)
src/electron/main/modules/browserwindow.ts:54
↓ 10 callers
Function
useContext
(context: React.Context<T>)
src/betterdiscord/api/reactutils.ts:76
↓ 10 callers
Method
useContext
(context: React.Context<T>)
src/betterdiscord/api/reactutils.ts:14
↓ 10 callers
Method
warn
* Logs a warning message. * * @param {string} pluginName - Name of the calling module. * @param {...any} message - Messages to have
src/betterdiscord/api/logger.ts:84
↓ 9 callers
Function
assign
(filter: T, args: any)
src/betterdiscord/webpack/filter.ts:4
↓ 9 callers
Method
close
* Closes the current opened context menu immediately.
src/betterdiscord/api/contextmenu.ts:513
↓ 9 callers
Method
delete
* Attempt to delete the local addon * @public * @param {boolean} shouldSkipConfirm Should skip the confirm to delete the addon
src/betterdiscord/modules/addonstore.ts:368
↓ 9 callers
Method
err
* Logs using error formatting. For logging an actual error object consider {@link module:Logger.stacktrace} * * @param {string} module - Nam
src/common/logger.ts:46
↓ 9 callers
Function
getAllModules
(filter: Webpack.ModuleFilter, options: Webpack.Options = {})
src/betterdiscord/webpack/searching.ts:79
↓ 9 callers
Function
getDeclaration
(module: Webpack.Module<any>, filter: Webpack.ExportedOnlyFilter)
src/betterdiscord/webpack/shared.ts:37
↓ 9 callers
Method
pushChildPatch
* This method patches onto another function, allowing your code to run before, instead or after the original function. * Using this you are able
src/betterdiscord/modules/patcher.ts:268
↓ 9 callers
Function
shouldSkipModule
(exports: any)
src/betterdiscord/webpack/shared.ts:47
↓ 9 callers
Method
useState
(initial: T | (() => T))
src/betterdiscord/api/reactutils.ts:10
↓ 8 callers
Function
getOptions
(args: WithOptions<T, B>, defaultOptions: B = {} as B)
src/betterdiscord/api/webpack.ts:8
↓ 8 callers
Method
injectStyle
(id: string, css: string)
src/betterdiscord/modules/dommanager.ts:94
↓ 8 callers
Method
isInstalled
@public
src/betterdiscord/modules/addonstore.ts:382
↓ 8 callers
Method
parseToReact
(str: string, inline = true)
src/betterdiscord/structs/markdown.ts:12
↓ 7 callers
Function
Number
({value: initialValue, min, max, step = 1, onChange, disabled}: NumberInputProps)
src/betterdiscord/ui/settings/components/number.tsx:19
↓ 7 callers
Method
addChangeListener
(listener: () => void)
src/betterdiscord/types/discord/modules.d.ts:46
↓ 7 callers
Function
callback
(_: unknown, state: boolean)
src/electron/preload/api/editor.ts:15
↓ 7 callers
Function
comparator
(currentVersion: string, remoteVersion: string)
src/betterdiscord/structs/semver.ts:63
↓ 7 callers
Method
delete
* Deletes a piece of stored data. This is different than saving `null` or `undefined`. * * @param {string} pluginName Name of the plugin del
src/betterdiscord/api/data.ts:88
↓ 7 callers
Function
getModule
(filter: ModuleFilter, options: WebpackOptions = {})
src/betterdiscord/api/webpack.ts:88
↓ 7 callers
Method
getSetting
(category: string, key: string)
src/electron/main/modules/betterdiscord.ts:23
↓ 7 callers
Function
isValidTranslation
(value: unknown)
src/common/i18n.ts:62
↓ 7 callers
Function
makeException
()
src/betterdiscord/webpack/shared.ts:67
↓ 7 callers
Function
mapObject
(module: any, mappers: Record<keyof T, Webpack.ExportedOnlyFilter>)
src/betterdiscord/utils/object.ts:3
↓ 6 callers
Method
_log
* Logs strings using different console levels and a module label. * * @param {string} module - Name of the calling module. * @param {an
src/common/logger.ts:94
↓ 6 callers
Method
error
* Alias for "err" * @param {string} module NAme of the calling module * @param {...any} message Messages to have logged.
src/common/logger.ts:53
↓ 6 callers
Function
getByStrings
(...strings: WithOptions<string, WebpackOptions>)
src/betterdiscord/api/webpack.ts:157
↓ 6 callers
Function
getString
(value: string | {toString(): string;})
src/betterdiscord/ui/settings/addoncard.tsx:61
↓ 6 callers
Method
init
()
src/electron/preload/discordnativepatch.ts:115
↓ 6 callers
Method
insertCSS
(newCss: string)
src/betterdiscord/builtins/customcss.ts:149
↓ 6 callers
Function
isModuleInvalid
(moduleToPatch: any)
src/betterdiscord/api/patcher.ts:24
↓ 6 callers
Function
join
(...paths: string[])
src/betterdiscord/data/web.ts:11
↓ 6 callers
Method
openPath
(path: string)
src/betterdiscord/modules/ipc.ts:65
↓ 6 callers
Function
request
(this: any, ...args: any[])
src/betterdiscord/polyfill/request.ts:84
↓ 6 callers
Function
save
()
src/editor/script.ts:146
↓ 6 callers
Method
showGuildJoinModal
* Shows the guild join modal, to join invites * @param {string} code
src/betterdiscord/ui/modals.ts:253
↓ 6 callers
Function
toPx
(value: number | string)
src/betterdiscord/ui/tooltip.ts:5
↓ 6 callers
Function
useLayoutEffect
()
src/betterdiscord/api/reactutils.ts:80
↓ 6 callers
Method
write
(contents: string)
src/editor/types/global.d.ts:13
↓ 5 callers
Method
#_log
* Logs strings using different console levels and a module label. * * @param {string} module - Name of the calling module. * @param
src/betterdiscord/api/logger.ts:117
↓ 5 callers
Method
after
* This method patches onto another function, allowing your code to run after. * Using this, you are also able to modify the return value, using
src/betterdiscord/modules/patcher.ts:221
↓ 5 callers
Function
debounce
(executor: T, delay: number)
src/common/utils/debounce.ts:9
↓ 5 callers
Method
debug
* Logs used for debugging purposes. * * @param {string} pluginName - Name of the calling module. * @param {...any} message - Message
src/betterdiscord/api/logger.ts:100
↓ 5 callers
Method
delete
(file: Files, key: string)
src/betterdiscord/stores/json.ts:51
↓ 5 callers
Method
focus
()
src/betterdiscord/types/discord/modules.d.ts:12
↓ 5 callers
Method
getJSON
()
src/electron/main/modules/betterdiscord.ts:44
↓ 5 callers
Method
getName
()
src/betterdiscord/types/discord/modules.d.ts:38
↓ 5 callers
Function
getWithKey
(filter: ExportedOnlyFilter, options: WithKeyOptions = {})
src/betterdiscord/api/webpack.ts:80
next →
1–100 of 1,293, ranked by callers