UNPKG

@johnbotapp/discord-html-transcripts

Version:

A nicely formatted html transcript generator for discord.js.

26 lines (25 loc) 955 B
import { type Awaitable, type Channel, type Message, type Role, type User } from 'discord.js'; import type { ResolveImageCallback } from '../downloader/images'; declare module 'discord.js' { interface Guild { translate: (key: string, ...args: unknown[]) => Promise<string>; } } 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>; }; locale?: string; poweredBy?: boolean; footerText?: string; saveImages: boolean; favicon: 'guild' | string; hydrate: boolean; channelName?: string | null; }; export default function render({ messages, channel, callbacks, ...options }: RenderMessageContext): Promise<string>;