mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-28 11:45:04 +00:00
Redo +debug build (Revert this)
Signed-off-by: GitHub <noreply@github.com>
This commit is contained in:
parent
139a4ab4a8
commit
933635fcd0
11 changed files with 40 additions and 14 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue