3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-03-15 05:41:51 +00:00

Don't persist 'false' voice mute state

This commit is contained in:
Dragory 2018-12-14 09:09:54 +02:00
parent 6e7338e5ec
commit d94f06dba8

View file

@ -44,9 +44,9 @@ export class PersistPlugin extends Plugin {
persistData.nickname = member.nick;
}
if (this.configValue("persist_voice_mutes") && member.voiceState.mute != null) {
if (this.configValue("persist_voice_mutes") && member.voiceState.mute) {
persist = true;
persistData.is_voice_muted = member.voiceState.mute;
persistData.is_voice_muted = true;
}
if (persist) {
@ -83,6 +83,8 @@ export class PersistPlugin extends Plugin {
if (restore) {
await member.edit(toRestore, "Restored upon rejoin");
await this.persistedData.clear(member.id);
this.logs.log(LogType.MEMBER_RESTORE, {
member: stripObjectToScalars(member, ["user"])
});