import { Progress } from "../../Progress"; import { FileInput } from "../../parse/File"; import { Parser } from "../../parse/Parser"; export declare class DiscordParser extends Parser { private lastGuildId?; private lastChannelId?; private lastMessageTimestampInFile?; /** * Regex to find the timestamp of the last message in a Discord export file. * We use the timestamp of the last message as the `at` value (see @Parser) */ static readonly TS_MSG_REGEX: RegExp; /** * Parse a Discord export file from DCE (https://github.com/Tyrrrz/DiscordChatExporter) * * We are assuming that in the JSON file, the "guild" key appear first and the "channel" key second in the file. * This is up to DCE, hopefully they won't change it. * Since we are streaming the file, we can handle big exports 😊 */ parse(file: FileInput, progress?: Progress): AsyncGenerator; private parseGuild; private parseChannel; private parseMessage; /** * Parse a Discord Snowflake into its components * * See https://discord.com/developers/docs/reference#snowflakes */ parseSnowflake(snowflake: Snowflake): { timestamp: bigint; }; }