mirror of
https://github.com/tiramisulabs/seyfert.git
synced 2025-07-01 20:46:08 +00:00
30 lines
983 B
TypeScript
30 lines
983 B
TypeScript
import type { Snowflake } from './Snowflake.ts';
|
|
import { baseEndpoints as Endpoints } from '../discordeno/mod.ts';
|
|
|
|
export function USER_AVATAR(userId: Snowflake, icon: string): string {
|
|
return `${Endpoints.CDN_URL}/avatars/${userId}/${icon}`;
|
|
}
|
|
|
|
export function EMOJI_URL(id: Snowflake, animated = false): string {
|
|
return `https://cdn.discordapp.com/emojis/${id}.${animated ? 'gif' : 'png'}`;
|
|
}
|
|
|
|
export function USER_DEFAULT_AVATAR(
|
|
/** user discriminator */
|
|
altIcon: number,
|
|
): string {
|
|
return `${Endpoints.CDN_URL}/embed/avatars/${altIcon}.png`;
|
|
}
|
|
|
|
export function GUILD_BANNER(guildId: Snowflake, icon: string): string {
|
|
return `${Endpoints.CDN_URL}/banners/${guildId}/${icon}`;
|
|
}
|
|
|
|
export function GUILD_SPLASH(guildId: Snowflake, icon: string): string {
|
|
return `${Endpoints.CDN_URL}/splashes/${guildId}/${icon}`;
|
|
}
|
|
|
|
export function GUILD_ICON(guildId: Snowflake, icon: string): string {
|
|
return `${Endpoints.CDN_URL}/icons/${guildId}/${icon}`;
|
|
}
|