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

View file

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