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

Make several event handlers non-blocking for performance

This commit is contained in:
Dragory 2019-01-13 23:31:09 +02:00
parent bb8ef2d511
commit ba01dd9ce5
4 changed files with 10 additions and 3 deletions

View file

@ -7,7 +7,7 @@ import { LogType } from "../data/LogType";
import { stripObjectToScalars } from "../utils";
export class PersistPlugin extends Plugin {
public static pluginName = 'persist';
public static pluginName = "persist";
protected persistedData: GuildPersistedData;
protected logs: GuildLogs;
@ -57,6 +57,7 @@ export class PersistPlugin extends Plugin {
}
@d.event("guildMemberAdd")
@d.nonBlocking()
async onGuildMemberAdd(_, member: Member) {
const persistedData = await this.persistedData.find(member.id);
if (!persistedData) return;