<commit_before>// Type definitions for node-telegram-bot-api 0.40
// Project: https://github.com/yagop/node-telegram-bot-api
// Definitions by: <NAME> <https://github.com/ammuench>
//                 Agadar <https://github.com/agadar>
//                 <NAME> <https://github.com/Dabolus>
//                 Kallu609 <https://github.com/Kallu609>
//                 XC-Zhang <https://github.com/XC-Zhang>
//                 AdityaThebe <https://github.com/adityathebe>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3

/// <reference types="node" />

import { EventEmitter } from 'events';
import { Stream, Readable } from 'stream';
import { ServerOptions } from 'https';
import { Options } from 'request';

declare namespace TelegramBot {
    interface TextListener {
        regexp: RegExp;
        callback(msg: Message, match: RegExpExecArray | null): void;
    }

    interface ReplyListener {
        id: number;
        chatId: number | string;
        messageId: number | string;
        callback(msg: Message): void;
    }

    type ChatType = 'private' | 'group' | 'supergroup' | 'channel';

    type ChatAction = 'typing' | 'upload_photo' | 'record_video' | 'upload_video' | 'record_audio' | 'upload_audio' | 'upload_document' | 'find_location' | 'record_video_note' | 'upload_video_note';

    type ChatMemberStatus = 'creator' | 'administrator' | 'member' | 'restricted' | 'left' | 'kicked';

    type DocumentMimeType = 'application/pdf' | 'application/zip';

    type MessageType =
        'text' |
        'animation' |
        'audio' |
        'channel_chat_created' |
        'contact' |
        'delete_chat_photo' |
        'document' |
        'game' |
        'group_chat_created' |
        'invoice' |
        'left_chat_member' |
        'location' |
        'migrate_from_chat_id' |
        'migrate_to_chat_id' |
        'new_chat_members' |
        'new_chat_photo' |
        'new_chat_title' |
        'passport_data' |
        'photo' |
        'pinned_message' |
        'sticker' |
        'successful_payment' |
        'supergroup_chat_created' |
        'video' |
        'video_note' |
        'voice';

    type MessageEntityType = 'mention' | 'hashtag' | 'bot_command' | 'url' | 'email' | 'bold' | 'italic' | 'code' | 'pre' | 'text_link' | 'text_mention';

    type ParseMode = 'Markdown' | 'HTML';

    /// METHODS OPTIONS ///
    interface PollingOptions {
        interval?: string | number;
        autoStart?: boolean;
        params?: GetUpdatesOptions;
    }

    interface WebHookOptions {
        host?: string;
        port?: number;
        key?: string;
        cert?: string;
        pfx?: string;
        autoOpen?: boolean;
        https?: ServerOptions;
        healthEndpoint?: string;<commit_msg>Added new type for ParseMode (#41990)<commit_after>// Type definitions for node-telegram-bot-api 0.40
// Project: https://github.com/yagop/node-telegram-bot-api
// Definitions by: <NAME> <https://github.com/ammuench>
//                 Agadar <https://github.com/agadar>
//                 <NAME> <https://github.com/Dabolus>
//                 Kallu609 <https://github.com/Kallu609>
//                 XC-Zhang <https://github.com/XC-Zhang>
//                 AdityaThebe <https://github.com/adityathebe>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3

/// <reference types="node" />

import { EventEmitter } from 'events';
import { Stream, Readable } from 'stream';
import { ServerOptions } from 'https';
import { Options } from 'request';

declare namespace TelegramBot {
    interface TextListener {
        regexp: RegExp;
        callback(msg: Message, match: RegExpExecArray | null): void;
    }

    interface ReplyListener {
        id: number;
        chatId: number | string;
        messageId: number | string;
        callback(msg: Message): void;
    }

    type ChatType = 'private' | 'group' | 'supergroup' | 'channel';

    type ChatAction = 'typing' | 'upload_photo' | 'record_video' | 'upload_video' | 'record_audio' | 'upload_audio' | 'upload_document' | 'find_location' | 'record_video_note' | 'upload_video_note';

    type ChatMemberStatus = 'creator' | 'administrator' | 'member' | 'restricted' | 'left' | 'kicked';

    type DocumentMimeType = 'application/pdf' | 'application/zip';

    type MessageType =
        'text' |
        'animation' |
        'audio' |
        'channel_chat_created' |
        'contact' |
        'delete_chat_photo' |
        'document' |
        'game' |
        'group_chat_created' |
        'invoice' |
        'left_chat_member' |
        'location' |
        'migrate_from_chat_id' |
        'migrate_to_chat_id' |
        'new_chat_members' |
        'new_chat_photo' |
        'new_chat_title' |
        'passport_data' |
        'photo' |
        'pinned_message' |
        'sticker' |
        'successful_payment' |
        'supergroup_chat_created' |
        'video' |
        'video_note' |
        'voice';

    type MessageEntityType = 'mention' | 'hashtag' | 'bot_command' | 'url' | 'email' | 'bold' | 'italic' | 'code' | 'pre' | 'text_link' | 'text_mention';

    type ParseMode = 'Markdown' | 'MarkdownV2' | 'HTML';

    /// METHODS OPTIONS ///
    interface PollingOptions {
        interval?: string | number;
        autoStart?: boolean;
        params?: GetUpdatesOptions;
    }

    interface WebHookOptions {
        host?: string;
        port?: number;
        key?: string;
        cert?: string;
        pfx?: string;
        autoOpen?: boolean;
        https?: ServerOptions;
        healthEndpoint?: string;
{'fraction_non_alphanumeric': 0.13877551020408163, 'fraction_numerical': 0.004968944099378882, 'mean_word_length': 2.33096926713948, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, 'https://': 16, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '657809', 'n_tokens_mistral': 1799, 'n_tokens_neox': 1746, 'n_words': 357}