3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-03-15 05:41:51 +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 2f50232cf3
commit f3609aa8ab
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1
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) {