mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-23 01:25:02 +00:00
fix channels typing
This commit is contained in:
parent
50eb51cc0e
commit
5b3ce76502
1 changed files with 1 additions and 1 deletions
|
@ -17,7 +17,7 @@ export const SetSlowmodeAction = automodAction({
|
||||||
|
|
||||||
async apply({ pluginData, actionConfig, contexts }) {
|
async apply({ pluginData, actionConfig, contexts }) {
|
||||||
const slowmodeMs = Math.max(actionConfig.duration ? convertDelayStringToMS(actionConfig.duration)! : 0, 0);
|
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) {
|
if (channels.length === 0) {
|
||||||
channels.push(...contexts.filter(c => c.message?.channel_id).map(c => c.message!.channel_id));
|
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