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

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

@ -4,6 +4,7 @@ import { embedPadding, formatNumber, memoize, MINUTES, preEmbedPadding, resolveU
import { CategoryChannel, EmbedOptions, Guild, RESTChannelInvite, TextChannel, VoiceChannel } from "eris";
import moment from "moment-timezone";
import humanizeDuration from "humanize-duration";
import { getGuildPreview } from "./getGuildPreview";
export async function getServerInfoEmbed(
pluginData: PluginData<UtilityPluginType>,
@ -14,11 +15,7 @@ export async function getServerInfoEmbed(
thisServer
? memoize(() => pluginData.client.getRESTGuild(serverId), `getRESTGuild_${serverId}`, 10 * MINUTES)
: null,
memoize(
() => pluginData.client.getGuildPreview(serverId).catch(() => null),
`getGuildPreview_${serverId}`,
10 * MINUTES,
),
getGuildPreview(pluginData.client, serverId),
]);
if (!restGuild && !guildPreview) {