1
0
Fork 0
mirror of https://github.com/muerwre/vk-tg-bot.git synced 2025-05-08 05:06:40 +07:00
vk-tg-bot/src/utils/attachment.ts
2021-05-21 10:48:44 +07:00

9 lines
202 B
TypeScript

import { PhotoAttachment } from "vk-io";
export const getAttachment = (img: PhotoAttachment): string | undefined => {
try {
return img.mediumSizeUrl;
} catch (e) {
return undefined;
}
};