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/Mutes/functions/onMutesEvent.ts

11 lines
320 B
TypeScript
Raw Normal View History

2021-02-14 16:58:02 +02:00
import { GuildPluginData } from "knub";
import { MutesEvents, MutesPluginType } from "../types";
export function onMutesEvent<TEvent extends keyof MutesEvents>(
pluginData: GuildPluginData<MutesPluginType>,
event: TEvent,
listener: MutesEvents[TEvent],
) {
return pluginData.state.events.on(event, listener);
}