mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-19 16:05:01 +00:00
Cache invites when resolving them
This commit is contained in:
parent
5e72693a3b
commit
9ac761b4eb
3 changed files with 20 additions and 16 deletions
|
@ -167,7 +167,7 @@ export class CensorPlugin extends ZeppelinPlugin<TConfigSchema> {
|
|||
|
||||
const inviteCodes = getInviteCodesInString(messageContent);
|
||||
|
||||
let invites: Invite[] = await Promise.all(inviteCodes.map(code => this.bot.getInvite(code).catch(() => null)));
|
||||
let invites: Invite[] = await Promise.all(inviteCodes.map(code => this.resolveInvite(code)));
|
||||
|
||||
invites = invites.filter(v => !!v);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue