Add new multi-use !info command

This commit is contained in:
Dragory 2020-08-06 01:10:40 +03:00
parent 7ad2458fd9
commit 106a959b4d
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1
7 changed files with 184 additions and 61 deletions

View file

@ -0,0 +1,9 @@
import { Client, GuildPreview } from "eris";
import { memoize, MINUTES } from "../../../utils";
/**
* Memoized getGuildPreview
*/
export function getGuildPreview(client: Client, guildId: string): Promise<GuildPreview | null> {
return memoize(() => client.getGuildPreview(guildId).catch(() => null), `getGuildPreview_${guildId}`, 10 * MINUTES);
}