Add commands to list and reset counters

This commit is contained in:
Dragory 2021-05-03 19:33:30 +03:00
parent 25a3350196
commit a568e86d78
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1
8 changed files with 258 additions and 2 deletions

View file

@ -25,6 +25,9 @@ import {
import { getPrettyNameForCounter } from "./functions/getPrettyNameForCounter";
import { getPrettyNameForCounterTrigger } from "./functions/getPrettyNameForCounterTrigger";
import { counterExists } from "./functions/counterExists";
import { ResetAllCounterValuesCmd } from "./commands/ResetAllCounterValuesCmd";
import { CountersListCmd } from "./commands/CountersListCmd";
import { ResetCounterCmd } from "./commands/ResetCounterCmd";
const MAX_COUNTERS = 5;
const MAX_TRIGGERS_PER_COUNTER = 5;
@ -35,6 +38,7 @@ const defaultOptions: PluginOptions<CountersPluginType> = {
counters: {},
can_view: false,
can_edit: false,
can_reset_all: false,
},
overrides: [
{
@ -133,9 +137,12 @@ export const CountersPlugin = zeppelinGuildPlugin<CountersPluginType>()("counter
// prettier-ignore
commands: [
CountersListCmd,
ViewCounterCmd,
AddCounterCmd,
SetCounterCmd,
ResetCounterCmd,
ResetAllCounterValuesCmd,
],
async onLoad(pluginData) {