chore(lib/discord): cleanup

This commit is contained in:
PalmDevs 2026-08-14 01:50:09 +07:00
parent 9525f98289
commit c8d820cb15
No known key found for this signature in database
GPG key ID: 6FAE8F8677ACA8BA
2 changed files with 13 additions and 17 deletions

View file

@ -1,5 +1,5 @@
import { lookupModule, lookupModules } from '@revenge-mod/modules/finders' import { lookupModule, lookupModules } from '@revenge-mod/modules/finders'
import { withDependencies } from '@revenge-mod/modules/finders/filters' import { withDependencies, withProps } from '@revenge-mod/modules/finders/filters'
import { import {
ReactJSXRuntimeModuleId, ReactJSXRuntimeModuleId,
ReactModuleId, ReactModuleId,
@ -26,25 +26,21 @@ export let Design: Design = proxify(
() => { () => {
// ID: 13171 // ID: 13171
// [3909, 4608, 5182, 13172, 2, ...] (141 dependencies) // [3909, 4608, 5182, 13172, 2, ...] (141 dependencies)
const [, id] = lookupModule( const [module] = lookupModule(
withProps('TableRow', 'Button').and(
withDependencies<Design>( withDependencies<Design>(
atLeast(DesignMinimumDependencies, [ atLeast(DesignMinimumDependencies, [
[ImportTrackerModuleId], [ImportTrackerModuleId],
[ImportTrackerModuleId], [ImportTrackerModuleId],
[ReactNativeModuleId, ImportTrackerModuleId], [ReactNativeModuleId, ImportTrackerModuleId],
[ImportTrackerModuleId], [ImportTrackerModuleId],
ImportTrackerModuleId, ImportTrackerModuleId,
]), ]),
)
).keyAs('revenge.discord.design.Design'), ).keyAs('revenge.discord.design.Design'),
{
initialize: false,
},
) )
if (id === undefined) return if (module) return (Design = module)
const module = __r(id)!
if (module.TableRow && module.Button) return (Design = module)
}, },
{ {
hint: {}, hint: {},

View file

@ -27,7 +27,7 @@ export function onAnyFluxEventDispatched(patch: FluxEventDispatchPatch) {
* @param patch The patch function to apply when the event is dispatched. * @param patch The patch function to apply when the event is dispatched.
* @returns A function that can be used to remove the patch. * @returns A function that can be used to remove the patch.
* *
* @example Blocking the disptach * @example Blocking the dispatch
* ```ts * ```ts
* // Returning falsy values will prevent the event from being dispatched. * // Returning falsy values will prevent the event from being dispatched.
* onFluxEventDispatched('TYPING_START', () => {}) * onFluxEventDispatched('TYPING_START', () => {})