3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-03-19 07:20:00 +00:00
zeppelin/backend/src/plugins/Counters/functions/emitCounterEvent.ts

11 lines
347 B
TypeScript
Raw Normal View History

import { CounterEvents, CountersPluginType } from "../types";
import { GuildPluginData } from "knub";
export function emitCounterEvent<TEvent extends keyof CounterEvents>(
pluginData: GuildPluginData<CountersPluginType>,
event: TEvent,
...rest: Parameters<CounterEvents[TEvent]>
) {
return pluginData.state.events.emit(event, ...rest);
}