Finish preliminary rework, ready to test

This commit is contained in:
Dark 2021-06-02 04:07:50 +02:00
parent 57893e7f76
commit d0a1beb809
No known key found for this signature in database
GPG key ID: 2CD6ACB6B0A87B8A
177 changed files with 854 additions and 707 deletions

View file

@ -10,13 +10,15 @@ export const LogsVoiceStateUpdateEvt = logsEvt({
const newChannel = meta.args.newState.channel;
const member = meta.args.newState.member ?? meta.args.oldState.member!;
if (!newChannel) { // Leave evt
if (!newChannel) {
// Leave evt
meta.pluginData.state.guildLogs.log(LogType.VOICE_CHANNEL_LEAVE, {
member: stripObjectToScalars(member, ["user", "roles"]),
oldChannel: stripObjectToScalars(oldChannel),
newChannel: stripObjectToScalars(newChannel),
});
} else if (!oldChannel) { // Join Evt
} else if (!oldChannel) {
// Join Evt
meta.pluginData.state.guildLogs.log(LogType.VOICE_CHANNEL_JOIN, {
member: stripObjectToScalars(member, ["user", "roles"]),
oldChannel: stripObjectToScalars(oldChannel),
@ -29,6 +31,5 @@ export const LogsVoiceStateUpdateEvt = logsEvt({
newChannel: stripObjectToScalars(newChannel),
});
}
},
});