import { Guild } from "../../structures/mod.ts"; import { endpoints } from "../../util/constants.ts"; import { formatImageURL } from "../../util/utils.ts"; /** The full URL of the splash from Discords CDN. Undefined if no splash is set. */ export function guildSplashURL( guild: Guild, size: ImageSize = 128, format?: ImageFormats, ) { return guild.splash ? formatImageURL( endpoints.GUILD_SPLASH(guild.id, guild.splash), size, format, ) : undefined; }