mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-10 20:35:02 +00:00
Fix error when using an unknown counter from Automod
This commit is contained in:
parent
8763a06ef1
commit
ad8aab3937
4 changed files with 28 additions and 2 deletions
7
backend/src/plugins/Counters/functions/counterExists.ts
Normal file
7
backend/src/plugins/Counters/functions/counterExists.ts
Normal 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;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue