Add member_leave automod trigger
At least i think so - cant test it until knub changes are done
This commit is contained in:
parent
2700f4e389
commit
f9dd82f201
6 changed files with 49 additions and 2 deletions
|
@ -25,3 +25,25 @@ export const RunAutomodOnJoinEvt = typedGuildEventListener<AutomodPluginType>()(
|
|||
});
|
||||
},
|
||||
});
|
||||
|
||||
export const RunAutomodOnLeaveEvt = typedGuildEventListener<AutomodPluginType>()({
|
||||
event: "guildMemberRemove",
|
||||
listener({ pluginData, args: { member } }) {
|
||||
const context: AutomodContext = {
|
||||
timestamp: Date.now(),
|
||||
partialMember: member,
|
||||
joined: true,
|
||||
};
|
||||
|
||||
pluginData.state.queue.add(() => {
|
||||
pluginData.state.recentActions.push({
|
||||
type: RecentActionType.MemberLeave,
|
||||
context,
|
||||
count: 1,
|
||||
identifier: null,
|
||||
});
|
||||
|
||||
runAutomod(pluginData, context);
|
||||
});
|
||||
},
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue