3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-23 17:45:03 +00:00

Fix error when using an unknown counter from Automod

This commit is contained in:
Dragory 2021-04-11 13:44:48 +03:00
parent 3abac506e0
commit 5b88ad5865
4 changed files with 28 additions and 2 deletions

View file

@ -0,0 +1,7 @@
import { GuildPluginData } from "knub";
import { CountersPluginType } from "../types";
export function counterExists(pluginData: GuildPluginData<CountersPluginType>, counterName: string) {
const config = pluginData.config.get();
return config.counters[counterName] != null;
}