mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-03-18 23:09:59 +00:00
10 lines
334 B
TypeScript
10 lines
334 B
TypeScript
import { GuildPluginData } from "knub";
|
|
import { CounterEvents, CountersPluginType } from "../types";
|
|
|
|
export function onCounterEvent<TEvent extends keyof CounterEvents>(
|
|
pluginData: GuildPluginData<CountersPluginType>,
|
|
event: TEvent,
|
|
listener: CounterEvents[TEvent],
|
|
) {
|
|
return pluginData.state.events.on(event, listener);
|
|
}
|