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

Fix config parsing issues caused by RoleAddedTrigger/RoleRemovedTrigger default config

This commit is contained in:
Dragory 2020-11-09 20:12:54 +02:00
parent 5946e920f6
commit 08ec91be28
2 changed files with 2 additions and 2 deletions

View file

@ -9,7 +9,7 @@ interface RoleAddedMatchResult {
export const RoleAddedTrigger = automodTrigger<RoleAddedMatchResult>()({
configType: t.union([t.string, t.array(t.string)]),
defaultConfig: [],
defaultConfig: "",
async match({ triggerConfig, context, pluginData }) {
if (!context.member || !context.rolesChanged || context.rolesChanged.added!.length === 0) {

View file

@ -9,7 +9,7 @@ interface RoleAddedMatchResult {
export const RoleRemovedTrigger = automodTrigger<RoleAddedMatchResult>()({
configType: t.union([t.string, t.array(t.string)]),
defaultConfig: [],
defaultConfig: "",
async match({ triggerConfig, context, pluginData }) {
if (!context.member || !context.rolesChanged || context.rolesChanged.removed!.length === 0) {