mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-03-16 22:21: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 * as t from "io-ts";
|
||||||
import { ChannelTypeStrings } from "../../../types";
|
import { ChannelTypeStrings } from "../../../types";
|
||||||
|
import { tNullable } from "../../../utils";
|
||||||
import { automodTrigger } from "../helpers";
|
import { automodTrigger } from "../helpers";
|
||||||
|
|
||||||
interface JoinVoiceChannelResult {
|
interface JoinVoiceChannelResult {
|
||||||
|
@ -8,8 +9,7 @@ interface JoinVoiceChannelResult {
|
||||||
|
|
||||||
export const JoinVoiceChannelTrigger = automodTrigger<JoinVoiceChannelResult>()({
|
export const JoinVoiceChannelTrigger = automodTrigger<JoinVoiceChannelResult>()({
|
||||||
configType: t.type({
|
configType: t.type({
|
||||||
channels: t.union([t.string, t.array(t.string)]),
|
include_moves: tNullable(t.boolean),
|
||||||
include_moves: t.boolean,
|
|
||||||
}),
|
}),
|
||||||
|
|
||||||
defaultConfig: {
|
defaultConfig: {
|
||||||
|
@ -25,11 +25,6 @@ export const JoinVoiceChannelTrigger = automodTrigger<JoinVoiceChannelResult>()(
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const triggerChannels = Array.isArray(triggerConfig.channels) ? triggerConfig.channels : [triggerConfig.channels];
|
|
||||||
if (!triggerChannels.includes(matchedChannelId)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
extra: {
|
extra: {
|
||||||
matchedChannelId,
|
matchedChannelId,
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import * as t from "io-ts";
|
import * as t from "io-ts";
|
||||||
import { ChannelTypeStrings } from "../../../types";
|
import { ChannelTypeStrings } from "../../../types";
|
||||||
|
import { tNullable } from "../../../utils";
|
||||||
import { automodTrigger } from "../helpers";
|
import { automodTrigger } from "../helpers";
|
||||||
|
|
||||||
interface LeaveVoiceChannelResult {
|
interface LeaveVoiceChannelResult {
|
||||||
|
@ -8,8 +9,7 @@ interface LeaveVoiceChannelResult {
|
||||||
|
|
||||||
export const LeaveVoiceChannelTrigger = automodTrigger<LeaveVoiceChannelResult>()({
|
export const LeaveVoiceChannelTrigger = automodTrigger<LeaveVoiceChannelResult>()({
|
||||||
configType: t.type({
|
configType: t.type({
|
||||||
channels: t.union([t.string, t.array(t.string)]),
|
include_moves: tNullable(t.boolean),
|
||||||
include_moves: t.boolean,
|
|
||||||
}),
|
}),
|
||||||
|
|
||||||
defaultConfig: {
|
defaultConfig: {
|
||||||
|
@ -25,11 +25,6 @@ export const LeaveVoiceChannelTrigger = automodTrigger<LeaveVoiceChannelResult>(
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const triggerChannels = Array.isArray(triggerConfig.channels) ? triggerConfig.channels : [triggerConfig.channels];
|
|
||||||
if (!triggerChannels.includes(matchedChannelId)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
extra: {
|
extra: {
|
||||||
matchedChannelId,
|
matchedChannelId,
|
||||||
|
|
Loading…
Add table
Reference in a new issue