feat: option to trigger antiraid_level only on change (#424)
Co-authored-by: Almeida <github@almeidx.dev>
This commit is contained in:
parent
d51461ee3a
commit
8a4a2d3647
4 changed files with 16 additions and 3 deletions
|
@ -9,10 +9,11 @@ export async function setAntiraidLevel(
|
|||
newLevel: string | null,
|
||||
user?: User,
|
||||
) {
|
||||
const oldLevel = pluginData.state.cachedAntiraidLevel;
|
||||
pluginData.state.cachedAntiraidLevel = newLevel;
|
||||
await pluginData.state.antiraidLevels.set(newLevel);
|
||||
|
||||
runAutomodOnAntiraidLevel(pluginData, newLevel, user);
|
||||
runAutomodOnAntiraidLevel(pluginData, newLevel, oldLevel, user);
|
||||
|
||||
const logs = pluginData.getPlugin(LogsPlugin);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue