mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-04 01:40:08 +00:00
fix: revert name change
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
import { eventHandlers, replaceEventHandlers } from "../bot.ts";
|
||||
import type { EventHandlerFunctions } from "../types/discordeno/eventHandlers.ts";
|
||||
import type { EventHandlers } from "../types/discordeno/eventHandlers.ts";
|
||||
import type { EventEmitter } from "https://deno.land/std@0.96.0/node/events.ts";
|
||||
|
||||
export function proxyEvent(emitter: EventEmitter) {
|
||||
replaceEventHandlers(new Proxy(eventHandlers, {
|
||||
get(target, prop: keyof EventHandlerFunctions) {
|
||||
get(target, prop: keyof EventHandlers) {
|
||||
return target[prop] !== undefined ? target[prop] : ((...args: unknown[]) => emitter.emit(prop, ...args));
|
||||
},
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user