Counters v0.9
Includes automod trigger/action. No user-facing commands yet.
This commit is contained in:
parent
ec37cf27a2
commit
c3407e2d5d
29 changed files with 1387 additions and 3 deletions
10
backend/src/plugins/Counters/functions/emitCounterEvent.ts
Normal file
10
backend/src/plugins/Counters/functions/emitCounterEvent.ts
Normal file
|
@ -0,0 +1,10 @@
|
|||
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);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue