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

Make lengthy handlers nonBlocking

This commit is contained in:
Dragory 2019-02-08 22:37:09 +02:00
parent ec5e8ec84f
commit 988f0842a0
2 changed files with 6 additions and 0 deletions

View file

@ -135,6 +135,7 @@ export class ModActionsPlugin extends ZeppelinPlugin {
* Attempts to find the ban's details in the audit log.
*/
@d.event("guildBanAdd")
@d.nonBlocking()
async onGuildBanAdd(guild: Guild, user: User) {
if (this.isEventIgnored(IgnoredEventType.Ban, user.id)) {
this.clearIgnoredEvent(IgnoredEventType.Ban, user.id);
@ -172,6 +173,7 @@ export class ModActionsPlugin extends ZeppelinPlugin {
* Attempts to find the unban's details in the audit log.
*/
@d.event("guildBanRemove")
@d.nonBlocking()
async onGuildBanRemove(guild: Guild, user: User) {
if (this.isEventIgnored(IgnoredEventType.Unban, user.id)) {
this.clearIgnoredEvent(IgnoredEventType.Unban, user.id);
@ -227,6 +229,7 @@ export class ModActionsPlugin extends ZeppelinPlugin {
}
@d.event("guildMemberRemove")
@d.nonBlocking()
async onGuildMemberRemove(_, member: Member) {
if (this.isEventIgnored(IgnoredEventType.Kick, member.id)) {
this.clearIgnoredEvent(IgnoredEventType.Kick, member.id);