mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-07-07 19:17:19 +00:00
Cache invites when resolving them
This commit is contained in:
parent
6ff8c8d290
commit
e3d734801d
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