UNPKG

@fantinodavide/discord-html-transcripts

Version:

A nicely formatted html transcript generator for discord.js.

20 lines (19 loc) 804 B
import { type Awaitable, type Channel, type Message, type Role, type User } from 'discord.js'; import type { ResolveImageCallback } from '../downloader/images'; export type RenderMessageContext = { messages: Message[]; channel: Channel; callbacks: { resolveImageSrc: ResolveImageCallback; resolveChannel: (channelId: string) => Awaitable<Channel | null>; resolveUser: (userId: string) => Awaitable<User | null>; resolveRole: (roleId: string) => Awaitable<Role | null>; }; poweredBy?: boolean; footerText?: string; saveImages: boolean; favicon: 'guild' | string; hydrate: boolean; profiles?: Record<string, any>; }; export default function render({ messages, channel, callbacks, ...options }: RenderMessageContext): Promise<string>;