zappyzep/backend/src/plugins/ModActions/functions/formatReasonWithAttachments.ts

7 lines
248 B
TypeScript
Raw Normal View History

2020-07-23 00:37:33 +03:00
import { Attachment } from "eris";
export function formatReasonWithAttachments(reason: string, attachments: Attachment[]) {
const attachmentUrls = attachments.map(a => a.url);
return ((reason || "") + " " + attachmentUrls.join(" ")).trim();
}