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:
parent
bb8ef2d511
commit
ba01dd9ce5
4 changed files with 10 additions and 3 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue