Documentation Index
Fetch the complete documentation index at: https://mintlify.com/betterdiscord/betterdiscord/llms.txt
Use this file to discover all available pages before exploring further.
Webpack is a utility class for getting internal webpack modules. This is extremely useful for interacting with the internals of Discord.
Properties
A Proxy that returns the module source by ID. Access modules directly:
BdApi.Webpack.modules[123]Collection of Discord’s Flux stores.
Filters
Series of filters to be used for finding webpack modules. Access viaBdApi.Webpack.Filters.
byKeys
Generates a function that filters by a set of properties.Property names to search for.
byPrototypeKeys
Generates a function that filters by a set of properties on the object’s prototype.Prototype property names to search for.
byRegex
Generates a function that filters by a regex.Regular expression to test against module source code.
bySource
Generates a function that filters by source code content.Strings or regexes to search for in the module source.
byStrings
Generates a function that filters by strings.Strings to search for.
byDisplayName
Generates a function that filters by thedisplayName property.
Display name to search for.
byStoreName
Generates a function that filters by a specific internal Store name.Store name to search for.
combine
Generates a combined function from a list of filters.Filters to combine.
not
Generates a filter that returns the opposite of the passed filter.Filter to invert.
byComponentType
Generates a filter to search React functional components.Filter function to apply to React components.
Methods
getModule
Finds a single webpack module matching the filter.Function to filter modules. Should return
true for a match.Options to customize the search.
undefined
getModules
Finds all webpack modules matching the filter.Function to filter modules.
Same options as
getModule (except first is always false).Array - Array of found modules
getByKeys
Finds a module with specific property keys.Property names to search for.
Optional options object (same as
getModule).undefined
getAllByKeys
Finds all modules with specific property keys.Property names to search for.
Optional options object.
Array - Array of found modules
getByPrototypeKeys
Finds a module by prototype property keys.Prototype property names to search for.
Optional options object.
undefined
getAllByPrototypeKeys
Finds all modules by prototype property keys.Prototype property names to search for.
Optional options object.
Array - Array of found modules
getByStrings
Finds a module containing specific strings.Strings to search for.
Optional options object.
undefined
getAllByStrings
Finds all modules containing specific strings.Strings to search for.
Optional options object.
Array - Array of found modules
getBySource
Finds a module by source code content.Strings or regexes to search for in source code.
Optional options object.
undefined
getAllBySource
Finds all modules by source code content.Strings or regexes to search for in source code.
Optional options object.
Array - Array of found modules
getByRegex
Finds a module matching a regex pattern.Regular expression to test against.
Optional options object.
undefined
getAllByRegex
Finds all modules matching a regex pattern.Regular expression to test against.
Optional options object.
Array - Array of found modules
getWithKey
Finds a module and returns both the module and the key it was found on.Filter function for exported values.
Options object (excludes
first option).[module, key] - Tuple of module and the key it was found on
getMangled
Finds a module and extracts mangled/minified property names.Filter to find the base module.
Object mapping desired names to filters for finding the actual property.
Optional options object.
getBulk
Finds multiple modules in a single operation for better performance.Multiple filter queries.
Array - Array of found modules in the same order as queries
getBulkKeyed
Finds multiple modules and returns them as a keyed object.Object mapping desired names to filter queries.
waitForModule
Waits for a module to be loaded and returns a promise that resolves when found.Filter function to find the module.
Options to customize the wait behavior.
Promise - Promise that resolves to the found module
getStore
Gets a Flux store by name.Name of the store to retrieve.
undefined
getById
Gets a webpack module by its numeric ID.The webpack module ID.
undefined