mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-23 01:25:02 +00:00
Update backend/src/plugins/Automod/actions/setSlowmode.ts
Co-authored-by: Almeida <almeidx@pm.me>
This commit is contained in:
parent
53b82b6214
commit
6966818d66
1 changed files with 1 additions and 1 deletions
|
@ -17,7 +17,7 @@ export const SetSlowmodeAction = automodAction({
|
|||
|
||||
async apply({ pluginData, actionConfig, contexts }) {
|
||||
const slowmodeMs = Math.max(actionConfig.duration ? convertDelayStringToMS(actionConfig.duration)! : 0, 0);
|
||||
const channels: string[] = actionConfig.channels ?? [];
|
||||
const channels: Snowflake[] = actionConfig.channels ?? [];
|
||||
if (channels.length === 0) {
|
||||
channels.push(...contexts.filter(c => c.message?.channel_id).map(c => c.message!.channel_id));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue