3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-21 16:55:03 +00:00

fix channels typing

This commit is contained in:
metal 2021-09-01 15:38:32 +00:00 committed by GitHub
parent 50eb51cc0e
commit 5b3ce76502

View file

@ -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 = actionConfig.channels ?? new Array();
const channels: string[] = actionConfig.channels ?? [];
if (channels.length === 0) {
channels.push(...contexts.filter(c => c.message?.channel_id).map(c => c.message!.channel_id));
}