3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-14 22:05:01 +00:00

Make more events non-blocking

This commit is contained in:
Dragory 2019-02-16 14:13:46 +02:00
parent 44c731564b
commit 6358022442
3 changed files with 11 additions and 8 deletions

View file

@ -17,8 +17,8 @@ export class PersistPlugin extends Plugin {
config: {
persisted_roles: [],
persist_nicknames: false,
persist_voice_mutes: false
}
persist_voice_mutes: false,
},
};
}
@ -28,6 +28,7 @@ export class PersistPlugin extends Plugin {
}
@d.event("guildMemberRemove")
@d.nonBlocking()
onGuildMemberRemove(_, member: Member) {
let persist = false;
const persistData: IPartialPersistData = {};
@ -89,7 +90,7 @@ export class PersistPlugin extends Plugin {
await this.persistedData.clear(member.id);
this.logs.log(LogType.MEMBER_RESTORE, {
member: stripObjectToScalars(member, ["user"])
member: stripObjectToScalars(member, ["user"]),
});
}
}