mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-03-15 05:41:51 +00:00
remove channels config from join/leave vc
This commit is contained in:
parent
c19ca674d8
commit
3acb089f47
2 changed files with 4 additions and 14 deletions
|
@ -1,5 +1,6 @@
|
|||
import * as t from "io-ts";
|
||||
import { ChannelTypeStrings } from "../../../types";
|
||||
import { tNullable } from "../../../utils";
|
||||
import { automodTrigger } from "../helpers";
|
||||
|
||||
interface JoinVoiceChannelResult {
|
||||
|
@ -8,8 +9,7 @@ interface JoinVoiceChannelResult {
|
|||
|
||||
export const JoinVoiceChannelTrigger = automodTrigger<JoinVoiceChannelResult>()({
|
||||
configType: t.type({
|
||||
channels: t.union([t.string, t.array(t.string)]),
|
||||
include_moves: t.boolean,
|
||||
include_moves: tNullable(t.boolean),
|
||||
}),
|
||||
|
||||
defaultConfig: {
|
||||
|
@ -25,11 +25,6 @@ export const JoinVoiceChannelTrigger = automodTrigger<JoinVoiceChannelResult>()(
|
|||
return;
|
||||
}
|
||||
|
||||
const triggerChannels = Array.isArray(triggerConfig.channels) ? triggerConfig.channels : [triggerConfig.channels];
|
||||
if (!triggerChannels.includes(matchedChannelId)) {
|
||||
return;
|
||||
}
|
||||
|
||||
return {
|
||||
extra: {
|
||||
matchedChannelId,
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import * as t from "io-ts";
|
||||
import { ChannelTypeStrings } from "../../../types";
|
||||
import { tNullable } from "../../../utils";
|
||||
import { automodTrigger } from "../helpers";
|
||||
|
||||
interface LeaveVoiceChannelResult {
|
||||
|
@ -8,8 +9,7 @@ interface LeaveVoiceChannelResult {
|
|||
|
||||
export const LeaveVoiceChannelTrigger = automodTrigger<LeaveVoiceChannelResult>()({
|
||||
configType: t.type({
|
||||
channels: t.union([t.string, t.array(t.string)]),
|
||||
include_moves: t.boolean,
|
||||
include_moves: tNullable(t.boolean),
|
||||
}),
|
||||
|
||||
defaultConfig: {
|
||||
|
@ -25,11 +25,6 @@ export const LeaveVoiceChannelTrigger = automodTrigger<LeaveVoiceChannelResult>(
|
|||
return;
|
||||
}
|
||||
|
||||
const triggerChannels = Array.isArray(triggerConfig.channels) ? triggerConfig.channels : [triggerConfig.channels];
|
||||
if (!triggerChannels.includes(matchedChannelId)) {
|
||||
return;
|
||||
}
|
||||
|
||||
return {
|
||||
extra: {
|
||||
matchedChannelId,
|
||||
|
|
Loading…
Add table
Reference in a new issue