harmony/src/structures/cdn.ts

11 lines
301 B
TypeScript
Raw Normal View History

import { ImageFormats, ImageSize } from "../types/cdnTypes.ts";
export const ImageURL = (
url: string,
format: ImageFormats,
size?: ImageSize | 128
) => {
if (url.includes('a_')) {
return url + '.gif' + '?size=' + size
} else return url + '.' + format + '?size=' + size
}