3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-28 11:45:04 +00:00

+debug build method (revert this)

Signed-off-by: GitHub <noreply@github.com>
This commit is contained in:
metal 2023-03-13 10:02:54 +00:00 committed by GitHub
parent 1bce5a5090
commit a80af1e729
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 40 additions and 23 deletions

View file

@ -12,7 +12,9 @@ export const AddToCounterAction = automodAction({
defaultConfig: {},
async apply({ pluginData, contexts, actionConfig, matchResult, ruleName }) {
// @ts-expect-error
const countersPlugin = pluginData.getPlugin(CountersPlugin);
// @ts-expect-error
if (!countersPlugin.counterExists(actionConfig.counter)) {
pluginData.getPlugin(LogsPlugin).logBotAlert({
body: `Unknown counter \`${actionConfig.counter}\` in \`add_to_counter\` action of Automod rule \`${ruleName}\``,
@ -20,6 +22,7 @@ export const AddToCounterAction = automodAction({
return;
}
// @ts-expect-error
countersPlugin.changeCounterValue(
actionConfig.counter,
contexts[0].message?.channel_id || null,