harmony/src/structures/cdn.ts
Catry 0c9ab24f39 Add cdn
Co-Authored-By: Choi Minseo <minseo0388@outlook.com>
2020-10-23 12:19:40 +09:00

11 lines
No EOL
301 B
TypeScript

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
}